基于Mdate.js 插件 进行修改 修改为有单独选择年 单独选择年月 单独选择 年月日的插件 可以设置当前时间
new Mdate("dateSelectorTwo", {
acceptId: "dateSelectorTwo",
beginYear: "2000", //开始的年
beginMonth: "1",//开始的月
beginDay: "1",//开始的日
endYear: "2025",//结束的年
endMonth: "12",//结束的月
endDay: "31",//结束的日
defaultY: (new Date()).getFullYear(),//当前的年
defaultM: (new Date()).getMonth()+1,//当前的月
defaultD: (new Date()).getDate(),//当前的日
format: "/", //日期中间的间隔符
dateType:'y', //y是只选年 ym只选年月 ymd 选年月日
success:function(callback){ // 成功回调
console.log(callback)
},
cancelFn:function(){ // 结束回调
console('取消')
}
})