📜  jquery datetimepicker 格式 - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:01:13.060000             🧑  作者: Mango

代码示例1
$('#timePicker').datetimepicker({
   // dateFormat: 'dd-mm-yy',
   format:'DD/MM/YYYY HH:mm:ss',
    minDate: getFormattedDate(new Date())
});

function getFormattedDate(date) {
    var day = date.getDate();
    var month = date.getMonth() + 1;
    var year = date.getFullYear().toString().slice(2);
    return day + '-' + month + '-' + year;
}