Bootstrap Datepicker Get Date on Change Event Example

By Hardik Savani June 29, 2023 Category : Bootstrap jQuery

This post will help you to get date with format on change event in bootstrap datepicker.

few days ago, i was working on my calender app and i require to get date on selected date from datepicker. After i read bootstrap datepicker i found event "changeDate" for getting date on selected. But i also require to get selected date on my formate, so i again some research and then i found solution.

If you have also need to get date on change event on bootstrap datepicker then you can simply do it by following example:

Example:

$('#event_date').datepicker({

format: 'mm/dd/yyyy',

}).on('changeDate', function(e) {

console.log(e.format());

});

I hope it can help you....

Shares