diff --git a/pages/information/information.vue b/pages/information/information.vue index c53e223..ea0d776 100644 --- a/pages/information/information.vue +++ b/pages/information/information.vue @@ -175,7 +175,9 @@ }, watch: { //开始时间和结束时间要求是同一天 - "callerInfo.inTime"(newValue) { + "callerInfo.inTime"(value) { + //苹果手机不兼容2020-20-20这样的时间,只兼容2020/20/20 + const newValue = value.replace(/-/g,"/") this.outTimeMinDate = new Date(newValue).getTime() //结束时间的最小时间是选择的开始时间 this.outTimeMaxDate = new Date(new Date(newValue).toLocaleDateString()).getTime() + 24 * 60 * 60 * 1000 - 1 }, diff --git a/pages/information/information.vue b/pages/information/information.vue index c53e223..ea0d776 100644 --- a/pages/information/information.vue +++ b/pages/information/information.vue @@ -175,7 +175,9 @@ }, watch: { //开始时间和结束时间要求是同一天 - "callerInfo.inTime"(newValue) { + "callerInfo.inTime"(value) { + //苹果手机不兼容2020-20-20这样的时间,只兼容2020/20/20 + const newValue = value.replace(/-/g,"/") this.outTimeMinDate = new Date(newValue).getTime() //结束时间的最小时间是选择的开始时间 this.outTimeMaxDate = new Date(new Date(newValue).toLocaleDateString()).getTime() + 24 * 60 * 60 * 1000 - 1 }, diff --git a/pagesA/changeListInfo/changeListInfo.vue b/pagesA/changeListInfo/changeListInfo.vue index a93b1bc..10885c4 100644 --- a/pagesA/changeListInfo/changeListInfo.vue +++ b/pagesA/changeListInfo/changeListInfo.vue @@ -186,7 +186,8 @@ }, watch: { //开始时间和结束时间要求是同一天 - "form.inTime"(newValue) { + "form.inTime"(value) { + const newValue = value.replace(/-/g,"/") this.endTimeMinDate = new Date(newValue).getTime() //结束时间的最小时间是选择的开始时间 this.endTimeMaxDate = new Date(new Date(newValue).toLocaleDateString()).getTime() + 24 * 60 * 60 * 1000 - 1 }, diff --git a/pages/information/information.vue b/pages/information/information.vue index c53e223..ea0d776 100644 --- a/pages/information/information.vue +++ b/pages/information/information.vue @@ -175,7 +175,9 @@ }, watch: { //开始时间和结束时间要求是同一天 - "callerInfo.inTime"(newValue) { + "callerInfo.inTime"(value) { + //苹果手机不兼容2020-20-20这样的时间,只兼容2020/20/20 + const newValue = value.replace(/-/g,"/") this.outTimeMinDate = new Date(newValue).getTime() //结束时间的最小时间是选择的开始时间 this.outTimeMaxDate = new Date(new Date(newValue).toLocaleDateString()).getTime() + 24 * 60 * 60 * 1000 - 1 }, diff --git a/pagesA/changeListInfo/changeListInfo.vue b/pagesA/changeListInfo/changeListInfo.vue index a93b1bc..10885c4 100644 --- a/pagesA/changeListInfo/changeListInfo.vue +++ b/pagesA/changeListInfo/changeListInfo.vue @@ -186,7 +186,8 @@ }, watch: { //开始时间和结束时间要求是同一天 - "form.inTime"(newValue) { + "form.inTime"(value) { + const newValue = value.replace(/-/g,"/") this.endTimeMinDate = new Date(newValue).getTime() //结束时间的最小时间是选择的开始时间 this.endTimeMaxDate = new Date(new Date(newValue).toLocaleDateString()).getTime() + 24 * 60 * 60 * 1000 - 1 }, diff --git a/pagesA/submitInfo/submitInfo.vue b/pagesA/submitInfo/submitInfo.vue index d680d70..f204e94 100644 --- a/pagesA/submitInfo/submitInfo.vue +++ b/pagesA/submitInfo/submitInfo.vue @@ -182,7 +182,8 @@ }, watch: { //开始时间和结束时间要求是同一天 - "form.inTime"(newValue) { + "form.inTime"(value) { + const newValue = value.replace(/-/g,"/") this.endTimeMinDate = new Date(newValue).getTime() //结束时间的最小时间是选择的开始时间 this.endTimeMaxDate = new Date(new Date(newValue).toLocaleDateString()).getTime() + 24 * 60 * 60 * 1000 - 1 },