How to set date format retrieved from UIDatePicker

后端 未结 2 996
别跟我提以往
别跟我提以往 2021-01-29 02:34

I am retrieving date from UIDatePicker ,now i want to convert in to wed, Dec29 12:30pm format , I also want to set that date to UIPickerView\'s current display date

2条回答
  •  北海茫月
    2021-01-29 03:06

    if you use jquery:

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

    More general info available here:

    http://docs.jquery.com/UI/Datepicker#option-dateFormat

    http://docs.jquery.com/UI/Datepicker/formatDate

    regards

    magna

提交回复
热议问题