FIX: Don't show the Tis Weekend option in date pickers on Sundays

This commit is contained in:
Andrei Prigorshnev
2021-07-24 20:29:54 +04:00
committed by Alan Guo Xiang Tan
parent 814781780d
commit f79eb207a6
2 changed files with 36 additions and 1 deletions

View File

@@ -46,7 +46,7 @@ export const TIMEFRAMES = [
buildTimeframe({
id: "this_weekend",
format: "ddd, h a",
enabled: (opts) => opts.day < 5 && opts.includeWeekend,
enabled: (opts) => opts.day > 0 && opts.day < 5 && opts.includeWeekend,
when: (time, timeOfDay) => time.day(6).hour(timeOfDay).minute(0),
icon: "bed",
}),