get selected value in datePicker and format it

前端 未结 4 1841
花落未央
花落未央 2021-02-10 02:01

In the datePicker selected 20.04.2012. I want to get this value, format it and store in a variable. I uses this code:

var date = $(\"#scheduleDate\"         


        
4条回答
  •  慢半拍i
    慢半拍i (楼主)
    2021-02-10 02:34

    var dateObject = $("#datePickerInput").datepicker('getDate');
    $.datepicker.formatDate('dd MM, yy', dateObject);
    

提交回复
热议问题