Merged in feat/sw-3134-daypicker (pull request #2495)
feat(SW-3134): Fix first day of month disabled * feat(SW-3134): Fix first day of month disabled * Fixed single daypicker Approved-by: Bianca Widstam
This commit is contained in:
@@ -34,7 +34,6 @@ export default function DatePickerSingleDesktop({
|
||||
/** English is default language and doesn't need to be imported */
|
||||
const locale = lang === Lang.en ? undefined : locales[lang]
|
||||
const currentDate = dt().toDate()
|
||||
const startOfMonth = dt(currentDate).set("date", 1).toDate()
|
||||
const yesterday = dt(currentDate).subtract(1, "day").toDate()
|
||||
|
||||
// Max future date allowed to book kept same as of existing prod.
|
||||
@@ -66,7 +65,7 @@ export default function DatePickerSingleDesktop({
|
||||
button_previous: `${classNames.button_previous} ${styles.button_previous}`,
|
||||
}}
|
||||
disabled={[
|
||||
{ from: startOfMonth, to: yesterday },
|
||||
{ from: undefined, to: yesterday },
|
||||
{ from: endDate, to: endOfLastMonth },
|
||||
]}
|
||||
footer
|
||||
|
||||
Reference in New Issue
Block a user