Topic: pickadate default date

robshelby free asked 3 years ago

How do I set the default date in pickadate?

$('.datepicker').pickadate({ min: new Date(1910, 1, 1), max: new Date(), defaultDate:new Date(1975,1,1), selectYears: 100, formatSubmit: 'mm/dd/yyyy', })

defaultDate doesn't seem to do anything.

I should mention that I realize I could do something like .val("1/1/2015").change(); ... But when you click on the input to change the date, the day/month/year selectors are still on today's date. Those selectors should also be on Jan, 1st, 2015.


Krzysztof Wilk staff answered 3 years ago


I think this snippet should resolve your problem :)

Best regards

robshelby free commented 3 years ago

This doesn't seem to do anything to me. Are you sure this works with 4.8.11?

Krzysztof Wilk staff commented 3 years ago


It works for me, check it here: If it still doesn't work for you - just remove the "data-value" attribute from the HTML section and uncomment JavaScript code. It's simple one but it works :)

Best regards

Please insert min. 20 characters.


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



Specification of the issue

  • ForumUser: Free
  • Premium support: No
  • Technology: MDB jQuery
  • MDB Version: 4.8.11
  • Device: windows
  • Browser: chrome
  • OS: windows
  • Provided sample code: No
  • Provided link: No