//处理默认日期
$(function(){
let mydate = new Date();
let year = mydate.getFullYear().toString(); //获取完整的年份
let month = (mydate.getMonth()+1).toString(); //获取当前月份
let date = mydate.getDate().toString(); //获取当前日
let result = year + '年' + month + '月' + date +'日'
console.log(month)
$datepicker.attr('placeholder', result)
})
网友评论