// 时间比较函数 compareDate:function (startDate, endDate) { var arrStart = startDate.split("-"); var startTime = new Date(arrStart[0], arrStart[1], arrStart[2]); var startTimes = startTime.getTime(); var arrEnd = endDate.split("-"); var endTime = new Date(arrEnd[0], arrEnd[1], arrEnd[2]); var endTimes = endTime.getTime(); if(endTimes<startTimes) { return false; } return true; },