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


Hi,

Try getting value from input. Here is the snippet showing this solution https://mdbootstrap.com/snippets/standard/d-wajszczuk/3254634#js-tab-view.

Keep coding,
Dawid



Please insert min. 20 characters.

FREE CONSULTATION

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

Status

Answered

Specification of the issue

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