jQuery UI DatePicker - Change Date Format

前端 未结 28 2370
后悔当初
后悔当初 2020-11-21 16:39

I am using the UI DatePicker from jQuery UI as the stand alone picker. I have this code:

And the

28条回答
  •  庸人自扰
    2020-11-21 17:09

    you should use data-date-format="yyyy-mm-dd" in your input field html and initial data picker in JQuery just like simple

    $("#issue_date").datepicker({ 
        dateFormat: "yy-mm-dd",
        changeMonth: true,
        changeYear: true
    });
    

提交回复
热议问题