I am using materializecss.com Datepicker. When i try to set date with jquery, the date doesn\'t get set. Here is my Code :-
// Materialize Date Picker
wi
If you are using angular
, or something similar, in order to manage your web application and you are not able to instance the Datepicker
object, according to the materialize documentation, using jQuery
you can refer to these methods of the object:
$('.datepicker').datepicker('setDate', new Date());
In the first parameter, in this case setDate
, you may specify the method name that you are about to use. In the second parameter, in this case new Date()
, you will pass the value to the function (if any).
In the example, that line will update the date of all datepickers with the class .datepicker
to today.