var data = $("#date").val(); //获取控件上选择的日期
data = data.replace("-","/");
if (data == "") {
alert("请选择日期!");
return;
}
var now = new Date();
now.setDate(now.getDate()-1);
var chknow = new Date(Date.parse(data));
alert(now);
alert(chknow);
if (chknow < now) {
alert("日期不能小于今天哦!");
return;
}