Merge pull request #13599 from Budibase/fix/calendary-start-of-week
Fix calendar using locale aware start of week
This commit is contained in:
commit
3d4f9b81bb
|
@ -4,6 +4,9 @@
|
|||
import dayjs from "dayjs"
|
||||
import NumberInput from "./NumberInput.svelte"
|
||||
import { createEventDispatcher } from "svelte"
|
||||
import isoWeek from "dayjs/plugin/isoWeek"
|
||||
|
||||
dayjs.extend(isoWeek)
|
||||
|
||||
export let value
|
||||
|
||||
|
@ -43,7 +46,7 @@
|
|||
return []
|
||||
}
|
||||
let monthEnd = monthStart.endOf("month")
|
||||
let calendarStart = monthStart.startOf("week")
|
||||
let calendarStart = monthStart.startOf("isoWeek")
|
||||
const numWeeks = Math.ceil((monthEnd.diff(calendarStart, "day") + 1) / 7)
|
||||
|
||||
let mondays = []
|
||||
|
|
Loading…
Reference in New Issue