Fix small inconsistency when picker is open for multiple minutes
This commit is contained in:
parent
96bc6fc789
commit
93630b36e2
|
@ -34,7 +34,7 @@
|
|||
const now = dayjs()
|
||||
let calendarDate
|
||||
|
||||
$: calendarDate = dayjs(value || now).startOf("month")
|
||||
$: calendarDate = dayjs(value || dayjs()).startOf("month")
|
||||
$: mondays = getMondays(calendarDate)
|
||||
|
||||
const getMondays = monthStart => {
|
||||
|
|
|
@ -6,9 +6,7 @@
|
|||
export let value
|
||||
export let onChange
|
||||
|
||||
const now = dayjs()
|
||||
|
||||
$: displayValue = value || now
|
||||
$: displayValue = value || dayjs()
|
||||
|
||||
const handleHourChange = e => {
|
||||
onChange(displayValue.hour(parseInt(e.target.value)))
|
||||
|
|
Loading…
Reference in New Issue