Holiday Notice: Support will be provided on a limited scale from December 24th, 2024, to January 2nd, 2025. Happy holidays and a wonderful New Year!


Topic: Open Date Picker on click

garrithsteyn pro asked 7 years ago


Hi How can I open the datePicker when clicking a button? Thanks

Mirosław Stasiak free answered 7 years ago


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

  • ForumUser: Pro
  • Premium support: No
  • Technology: MDB jQuery
  • MDB Version: -
  • Device: -
  • Browser: -
  • OS: -
  • Provided sample code: No
  • Provided link: No
Tags