[Feature Request] The choice of cut-off time based on the starting time
Existing Component
Yes
Component Name
el-date-picker
Description
The choice of cut-off time based on the starting time
What is cut-off time?
@Leopoldthecoder Deadline
pickerOptions0: {
disabledDate(time) {
return time.getTime() < Date.now() - 8.64e7;
}
},
I'd like to change ‘Date.now() ’ I set @Leopoldthecoder
You are free to change Date.now() to whatever variable you want.
@Leopoldthecoder This value is uncertain and is entered by the user.I don't know how to get this value.
<el-date-picker format="yyyy-MM-dd" v-model="Unselfsupportdata.shareStarTime" type="date" clearable style="width:135px">
</el-date-picker>
<el-date-picker format="yyyy-MM-dd" v-model="Unselfsupportdata.shareEndTime" :picker-options="pickerOptions0" type="date" clearable style="width:135px">
</el-date-picker>
pickerOptions0: {
disabledDate(time) {
console.log(this.$root)
return time.getTime() < Date.now() - 8.64e7;
}
},
Control the end time range depending on the start time. I probably didn't make it clear before.
https://jsfiddle.net/z7pyykza/
Succeed! Thanks very much