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