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: how to set datepicker date after update input val

mar1 free asked 6 years ago


After update input val $('#date').val("2019-01-22") datepicker shoving today or old clicked date. how to change date in datepicker after input val updated ?


mar1 free answered 6 years ago


i update input val in this way:

$('#date').pickadate('picker').set('select', "2019-01-02");

Mikołaj Smoleński staff commented 6 years ago

It's working great!

Thanks for Your help mar1.

Best regards


Mikołaj Smoleński staff answered 6 years ago


Hello Gianluca,

Thank you for your tips. They will be very helpful for us.

Best regards


gianlucagiacometti priority answered 6 years ago


As it stands currently, according to the previous discussion, the only chance you have is to strip away the input tag, re-add it and every time you re-add it you re-attach the pickadate()
It works for me also in modals. I strip it away on hide and re-add it after show the modal. Hope this helps


gianlucagiacometti priority answered 6 years ago


This feature should be a "must". At least please introduce the possibility to destroy the datepicker and re-attach it. Otherwise this thing is completely useless.


Mikołaj Smoleński staff answered 6 years ago


Unfortunately You can't update the datepicker value programatically.

Best regards



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: Free
  • Premium support: No
  • Technology: MDB jQuery
  • MDB Version: 4.5.15
  • Device: laptop
  • Browser: firefox
  • OS: win10
  • Provided sample code: No
  • Provided link: No