1
0
Fork 0
mirror of synced 2024-09-15 08:47:37 +12:00

Fix small inconsistency when picker is open for multiple minutes

This commit is contained in:
Andrew Kingston 2023-11-03 17:07:31 +00:00
parent 96bc6fc789
commit 93630b36e2
2 changed files with 2 additions and 4 deletions

View file

@ -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 => {

View file

@ -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)))