Topic: Set default options for all Datepicker instances

UNNdev priority asked 3 years ago

How can you set default options for all Datepicker instances? The documentation shows how to pass options when creating an instance via JavaScript or how to set options via HTML data attributes, but setting button labels, month names, etc. over and over again bloats up the HTML tremendously. Don't see a default options object exported.

UNNdev priority answered 3 years ago

Problem solved, I can use a custom class and initialize the Datepicker component myself based on that class.

Dawid Wajszczuk staff commented 3 years ago

I'm glad to you have found the solution. Keep coding :)

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: Priority
  • Premium support: Yes
  • Technology: MDB Standard
  • MDB Version: MDB5 3.7.1
  • Device: All devices
  • Browser: All browsers
  • OS: All operating systems
  • Provided sample code: No
  • Provided link: No