Miguel Angel Moreno pro asked 5 years ago

good afternoon how can I get the value of the datepicker?

Jakub Strebeyko staff answered 5 years ago

Hi there Miguel,

MDB Date Picker is a solution rooting out of a regular input element. As such, the Date Picker's value is accessible using .val() jQuery method. Consider the following snippet:

var datePicker = $('#date-picker-example');
console.log( datePicker.val() );

In case the value is necessary for, let's say, form submitting, its value gets POSTed just as any other. If that's the case though, please make sure that the Date Picker's input field has a name HTML attribute.

With Best Regards,

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: Pro
  • Premium support: No
  • Technology: MDB jQuery
  • MDB Version: -
  • Device: -
  • Browser: -
  • OS: -
  • Provided sample code: No
  • Provided link: No