Skip to content Skip to sidebar Skip to footer

Bootstrap Datepicker Trigger Change

I have from and to input fields with bootstrap date picker. When query params not empty I would like to change the value of these input fields and trigger the change date event on

Solution 1:

Try using the update mention in the documentation. Something like `$(start + ',' + end).datepicker('update', qParamStart);

If you're trying to figure out how to get the query params this is a good reference.

Solution 2:

You can do this by manually calling the event changeDate . E.g. $('.datepicker').datepicker().trigger('changeDate');

Solution 3:

Inspect the link from the calendar then call it conventionally. For me it was:

$('.ui-state-active').click();

or

$('.ui-datepicker-current-day').click();

Post a Comment for "Bootstrap Datepicker Trigger Change"