How can I manually open datepicker for js code?
To show the datepicker associated with the login with id 'your_elem', you should use something like this:
jQuery('#your_elem').datepicker("show");
$('#datepickerid').focus() gotta do the trick.
$('#datepickerid').focus()
$(function () { $('#DatePicker').datepicker({ duration: '', showTime: true, constrainInput: false, maxDate: '+1y', minDate: '-0d', defaultDate: '' }); });
I had this problem (datepicker in this case was part of the Drupal module) and it worked for me:
$('input.date').focus(); $('input.date').click();
This did not work when used only $('input.date').click();.
$('input.date').click();