fix: update date if input date is updated
This commit is contained in:
parent
66a68d3906
commit
cba988ecd7
@ -40,7 +40,7 @@
|
|||||||
class="text-sm"
|
class="text-sm"
|
||||||
type="text"
|
type="text"
|
||||||
:value="value"
|
:value="value"
|
||||||
@change="selectDate(getDate($event)) || togglePopover()"
|
@change="updateDate($event.target.value) || togglePopover()"
|
||||||
/>
|
/>
|
||||||
<Button
|
<Button
|
||||||
label="Now"
|
label="Now"
|
||||||
@ -314,6 +314,13 @@ export default {
|
|||||||
let d = new Date(...args)
|
let d = new Date(...args)
|
||||||
return d
|
return d
|
||||||
},
|
},
|
||||||
|
updateDate(date) {
|
||||||
|
date = this.getDate(date)
|
||||||
|
this.hour = date.getHours()
|
||||||
|
this.minute = date.getMinutes()
|
||||||
|
this.second = date.getSeconds()
|
||||||
|
this.selectDate(date, true)
|
||||||
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user