In this article, i will explain you to how to get selected date from bootstrap datepicker using on change event.
When ever you are working on using bootstrap project and you require to use datepicker then we always go to implement bootstrap datepicker js. it is very simple to use and we can simply customize it like change date format, you can give start date, disable some date etc.
Sometime, we work on large amount of project and if you require to get selected date by using changeDate event of bootstrap datepicker. So in this example i will simply show you how to get selected date using changeDate event.
Example:
$('#event_date').datepicker({
autoclose: true,
startDate: today,
format: 'mm/dd/yyyy',
daysOfWeekDisabled: "6,0",
language: "en"
}).on('changeDate', function(e) {
console.log(e.format());
});
I hope you found your best...
Do you like below Tutorials ?
- Laravel 7.x and 6.x Ajax Multiple Image Upload with Preview Example
- Laravel select with count(*) using db raw example
- PHP Laravel select with join subquery example
- PHP Laravel Ajax Form Submit Example
- How to create events for created/updated/deleted model task in Laravel 5?
- Angular JS Form Validation Example Code
- AngularJS - Confirm Password Validation Example
- Laravel Ajax Request using X-editable bootstrap Plugin Example