Topic: Datepicker Value in JS

BeldenSpartan premium asked 2 years ago

How do I access the datepicker value in JS?

When the user changes the date, I want to trigger an event that uses the new date. I was thinking something like this, but it doesn't work:

datepickerWithLimits.addEventListener('dateChange.mdb.datepicker', (e) => {
    var dateValue = e.value;

Dawid Wajszczuk staff answered 2 years ago


Try getting value from input. Here is the snippet showing this 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

  • User: Premium
  • Premium support: Yes
  • Technology: MDB Standard
  • MDB Version: MDB5 3.9.0
  • Device: PC
  • Browser: Chrome
  • OS: Windows
  • Provided sample code: No
  • Provided link: No