html代码遇新是直朋能到:
计划运行日期
js代码:
$('#planRunDt').datebox('setValue', getCurentDateStr());
$('#planRunDt').datebox('calendar').calendar({
validator : function(date){
var now = new Date();
var d1 = new Date(now.getFullYear(),now.getMonth(),now.getDate());
return date <= d1;
}
});
function getCurentDateStr()
{
var now = new Date();
var year = now.getFullYear(); //年
var month = now.getMonth() + 1; //月
var day = now.getDate(); //日
var clock = year + "-";
if(month < 10) clock += "0";
clock += month + "-";
if(day < 10) clock += "0";
clock += day;
return clock;
}
效果:
本文来源于网络:查看 >https://blog.csdn.net/qingmengwuhen1/article/details/70054371