jQuery UI DatePicker - Change Date Format

前端 未结 28 2291
后悔当初
后悔当初 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:00

    Here's one specific for your code:

    var date = $('#datepicker').datepicker({ dateFormat: 'dd-mm-yy' }).val();
    

    More general info available here:

    • http://api.jqueryui.com/datepicker/#option-dateFormat
    • http://api.jqueryui.com/datepicker/#utility-formatDate

提交回复
热议问题