Closed 7ben closed 6 years ago
I don't fully understand what you mean, can you show your code?
<
export default { components: { DatePicker }, data() { return { time1: '', time2: '', shortcuts: [ { text: 'before 1 hour', start: new Date(Date.now() - 3600 1000 1), end: new Date(Date.now()) } ] } } }
/ if i click shortcuts of before 1 hour after 3hour, date time is not right so i want to change shortcuts when i will click to input box (date-picker) /
You can listen the change event to change the shortcuts.
<date-picker @change="changeShout"></date-picker>
methods: {
changeShortcuts (date) {
this.shortcuts = [
{
text: 'before 1 hour',
start: new Date(date.getTime() - 3600 * 1000),
end: new Date(date.getTime())
}
]
}
}
thank you
you know when mounted page, shortcuts is fixed ex) before 1hour => start, end time is current time, but when i will click date-picker input box after 2 hour, this shortcuts is not right i want to change fixed shortcuts when mx-datepicker-popup css changed display plz help me