function checkDate(){
//replace(/\-/g, "\/")是根据验证表达式把日期转化成长日期格式
var sDate = new Date(document.getElementById_x("datetimepickerStart").value.replace(/\-/g, "\/"));
var eDate = new
Date(document.getElementById_x("datetimepickerEnd").value.replace(/\-/g,
"\/"));
if(sDate > eDate)
{
alert("结束日期不得小于开始日期!");
return false;
}
return
true;
}
时间: 2024-10-13 09:03:53