|
@@ -66,7 +66,21 @@
|
|
|
parent.layer.msg("工作开始日期不得大于工作结束日期!", {icon: 5});
|
|
|
return false;
|
|
|
}
|
|
|
- var newDate = new Date()
|
|
|
+ const year = new Date().getFullYear();
|
|
|
+ const month = new Date().getMonth();
|
|
|
+ const day = new Date().getDate();
|
|
|
+ var newDate = new Date(year, month, day, 0, 0, 0);
|
|
|
+
|
|
|
+ const startDateYear = startDate.getFullYear();
|
|
|
+ const startDateMonth = startDate.getMonth();
|
|
|
+ const startDateDay = startDate.getDate();
|
|
|
+ startDate = new Date(startDateYear, startDateMonth, startDateDay, 0, 0, 0);
|
|
|
+
|
|
|
+ const endingDateYear = startDate.getFullYear();
|
|
|
+ const endingDateMonth = startDate.getMonth();
|
|
|
+ const endingDateDay = startDate.getDate();
|
|
|
+ endingDate = new Date(endingDateYear, endingDateMonth, endingDateDay, 0, 0, 0);
|
|
|
+ console.log(newDate); // Wed Jan 13 2021 00:00:00 GMT+0800 (中国标准时间)
|
|
|
if(startDate.getTime() > newDate.getTime() || endingDate.getTime() < newDate.getTime()){
|
|
|
|
|
|
top.layer.open({
|