JQuery UI Datepicker date format issue with initial value

后端 未结 5 2211
梦毁少年i
梦毁少年i 2020-12-06 01:29

I need to set the initial date for the date picker to 03/20/2010 in mm-dd-yyyyy format. I have done this



        
5条回答
  •  暖寄归人
    2020-12-06 02:18

    $('#datepicker').datepicker('option', 'dateFormat', 'dd-mm-yy');
    

    Year is specified as y for 2 digits and yy for 4 digits, as stated here.

提交回复
热议问题