Get date on change event of Bootstrap Datepicker

September 14, 2018 | Category : JQuery Plugin JQuery Bootstrap

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...