|
@@ -210,8 +210,15 @@ export default {
|
|
|
// 开始日期
|
|
|
confirmStartDate(val) {
|
|
|
let d = val.year + '-' + val.month + '-' + val.day;
|
|
|
- this.form.startDate = d
|
|
|
- this.form.endDate = ''
|
|
|
+ if(moment(d).isSameOrAfter(moment(),'day')){
|
|
|
+ this.form.startDate = d
|
|
|
+ this.form.endDate = ''
|
|
|
+ }else{
|
|
|
+ uni.showToast({
|
|
|
+ icon: 'none',
|
|
|
+ title: '请选择今天或之后的日期'
|
|
|
+ });
|
|
|
+ }
|
|
|
},
|
|
|
openEndDate(){
|
|
|
this.showPickerEnd = this.form.cycleType=='WEEK'
|
|
@@ -221,7 +228,14 @@ export default {
|
|
|
let d = val.year + '-' + val.month + '-' + val.day;
|
|
|
let a = this.form.startDate;
|
|
|
if (a == '' || moment(d).isAfter(a)) {
|
|
|
- this.form.endDate = d;
|
|
|
+ if(a=='' && moment(d).isSameOrAfter(moment(),'day')){
|
|
|
+ this.form.endDate = d;
|
|
|
+ }else{
|
|
|
+ uni.showToast({
|
|
|
+ icon: 'none',
|
|
|
+ title: '请选择今天或之后的日期'
|
|
|
+ });
|
|
|
+ }
|
|
|
} else {
|
|
|
uni.showToast({
|
|
|
icon: 'none',
|