Open Date Picker on click


Topic: Open Date Picker on click

garrithsteyn pro asked 7 years ago

Hi How can I open the datePicker when clicking a button? Thanks
Hi, Check it out:
$('#my-button').on('click', function() {
  var $input = $('.datepicker').pickadate();
  var picker = $input.pickadate('picker');

  event.stopPropagation()
  event.preventDefault()
  picker.open();
});
  Regards,

garrithsteyn pro commented 7 years ago

Perfect, thank you

Please insert min. 20 characters.

FREE CONSULTATION

Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.

Status

Resolved

Specification of the issue
  • User: Pro
  • Premium support: No
  • Technology: MDB jQuery
  • MDB Version: -
  • Device: -
  • Browser: -
  • OS: -
  • Provided sample code: No
  • Provided link: No