Set default options for all Datepicker instances


Topic: Set default options for all Datepicker instances

UNNdev pro premium asked 5 days 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 pro premium answered 5 days ago

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


Dawid Wajszczuk staff commented 2 days ago

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


Please insert min. 20 characters.
Status

Resolved

Specification of the issue
  • User: Pro
  • 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