dlan pro asked 4 years ago


Expected behavior

For a datepicker with the option editable: true

  1. When I click on the inputfield I should be able to change the date by typing
  2. When clicked on an icon the datepicker pop-up should be opened with a Jquery call

Actual behavior

Modification by typing works, but when I try to open the picker with Jquery nothing happens. I have to click multiple times to open the datepicker

Resources (screenshots, code snippets etc.)

instantiate:

instantiation with editable option

Jquery function to open the picker: jquery

I found the inspiration for the Jquery function in an old forumpost, the new website does not contain a Jquery-section for datepicker.

Any idea how I can resolve this problem?


dlan pro commented 4 years ago

The "hacky" solution for my problem:

function activatePicker(pickerId){
    var picker = $(`#${pickerId}`).pickadate('picker');
    event.stopPropagation();
    event.preventDefault();
    picker.open();
    picker.open();
    picker.open();
}


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: 4.13.0
  • Device: pc
  • Browser: chrome
  • OS: windows
  • Provided sample code: No
  • Provided link: No