var newdate =
null;
function getToDay(){
var
now = new
Date();
var
nowYear = now.getFullYear();
var
nowMonth = now.getMonth();
var
nowDate = now.getDate();
newdate = new
Date(nowYear,nowMonth,nowDate);
nowMonth = doHandleMonth(nowMonth + 1);
nowDate = doHandleMonth(nowDate);
return
nowYear+"-"+nowMonth+"-"+nowDate;
}
function doHandleMonth(month){
if(month.toString().length == 1){
month = "0"
+ month;
}
return
month;
}
var
beginTime = $.trim($("#startDateTime").val());
bTime = beginTime.replace(/-/g,"/");
newdate = getToDay();
newdate = newdate.replace(/-/g,"/")
if(Date.parse(newdate)>Date.parse(bTime)){
$("#msg").html("<font class='tjbmfont'>开始时间不能小于今天</font>");
return
;
}