Topic: Set default options for all Datepicker instances

UNNdev priority asked 1 year 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 1 year ago


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


Dawid Wajszczuk staff commented 1 year ago

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



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

  • User: 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