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
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.
FREE CONSULTATION
Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.
Resolved
- 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