V - model="timeData
"Type="daterange
"Align="center"
Unlink - panels
Range - the separator="to"
Start - placeholder="start date"
End - placeholder="end date"
: picker - options="pickerOptions"
Size="small", "
@ change="getChange"
Value - the format="yyyy - MM - dd"
: clearable="false"
pickerOptions: {
DisabledDate (time) {
The return time. GetTime () & gt; Date. Now ();
},
Shortcuts: [
{
Text: "in the latest week,"
The onClick (picker) {
const end=new Date();
Const start=new Date ();
Start. The setTime (start getTime () - 3600 * 1000 * 24 * 7);
Picker. $emit (" pick ", [the start and end]);
}
},
{
Text: "last month",
The onClick (picker) {
const end=new Date();
Const start=new Date ();
start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
Picker. $emit (" pick ", [the start and end]);
}
},
{
Text: "in the past three months,"
The onClick (picker) {
const end=new Date();
Const start=new Date ();
Start. SetTime (start. GetTime () - 24 * 3600 * 1000 * 90);
Picker. $emit (" pick ", [the start and end]);
}
}
]
},
How to implement according to start time or end time, limiting can choose before and after three months?
CodePudding user response:
Someone to answer it for me?CodePudding user response:
The start_Date:
{//time limitationDisabledDate: time=& gt; {
If (this. AddForm. End_time) {
The return time. GetTime () & lt; Date. Now () - 8.64 e7 | | time. GetTime () & gt; Enclosing addForm. End_time;
}
The return time. GetTime () & lt; Date. Now () to 8.64 e7;
}
},
End_Date: {
DisabledDate: time=& gt; {
The return time. GetTime () & lt; Date. Now () - 8.64 e7 | | time. GetTime () & lt; Enclosing addForm. Start_time;
}
Probably is this meaning yourself looking at requirements changed
CodePudding user response:
https://blog.csdn.net/z9061/article/details/84787773Look at this article feel write very clear
CodePudding user response:
The