How to set the date in materialize datepicker

后端 未结 10 1251
长发绾君心
长发绾君心 2020-12-05 09:36

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         


        
10条回答
  •  清歌不尽
    2020-12-05 10:21

    just add the format you want your date looks like in the attributes of your element.

    $('.datepicker').pickadate({
        selectMonths: true, // Creates a dropdown to control month
        selectYears: 15, // Creates a dropdown of 15 years to control year
        format: 'dd-mm-yyyy' });
    

提交回复
热议问题