Skip to content

Commit 4ca8fe6

Browse files
committed
refactor: Log the firstDayOfWeek calculation to console
See #3341
1 parent 3a34bab commit 4ca8fe6

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/ui/Menus/DatePicker.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,14 @@ export function promptForDate(
2323
// Try to determine the first day of the week based on the locale, or use Monday
2424
// if unavailable
2525
const weekInfo = (new Intl.Locale(navigator.language) as any).weekInfo;
26+
console.log(`promptForDate(): weekInfo: ${JSON.stringify(weekInfo, null, 4)}`);
27+
2628
const firstDayOfWeekFromLocale = weekInfo.firstDay;
29+
console.log(`promptForDate(): firstDayOfWeekFromLocale: ${firstDayOfWeekFromLocale}`);
30+
2731
const firstDayOfWeek = firstDayOfWeekFromLocale ?? 1;
32+
console.log(`promptForDate(): firstDayOfWeek: ${firstDayOfWeek}`);
33+
2834
const fp = flatpickr(parentElement, {
2935
defaultDate: currentValue ? currentValue.format('YYYY-MM-DD') : new Date(),
3036
disableMobile: true,

0 commit comments

Comments
 (0)