diff --git a/frontend/src/components/EditPeriodDialogProvider.tsx b/frontend/src/components/EditPeriodDialogProvider.tsx index bc6bbae9..95504447 100644 --- a/frontend/src/components/EditPeriodDialogProvider.tsx +++ b/frontend/src/components/EditPeriodDialogProvider.tsx @@ -27,7 +27,10 @@ export const EditPeriodDialogProvider = ({ children }) => { const UpdateAbsenceRangesContainer = (): JSX.Element => (

Please enter below the new start and end date of your absence.

-

From

+
+ { startDate={updatedAbsenceStartDate} endDate={updatedAbsenceEndDate} monthsShown={1} + placeholderText="YYYY-MM-DD" + strictParsing /> -

To

+ { startDate={updatedAbsenceStartDate} endDate={updatedAbsenceEndDate} monthsShown={1} + placeholderText="YYYY-MM-DD" + strictParsing />
); diff --git a/frontend/src/pages/AbsencePlanner.tsx b/frontend/src/pages/AbsencePlanner.tsx index bff97645..dd582315 100644 --- a/frontend/src/pages/AbsencePlanner.tsx +++ b/frontend/src/pages/AbsencePlanner.tsx @@ -688,9 +688,7 @@ export const AbsencePlanner = () => { // We need to find a solution for better user feedback before enabling it again for that use case. const isDayEnabled = (date: Date) => { - return ( - !reportedDates.includes(formatDate(date, dateFormat)) && isWeekday(date) - ); + return isWeekday(date); }; const context = React.useContext(AuthContext); @@ -788,8 +786,8 @@ export const AbsencePlanner = () => { toggleLoadingPage(true); onUpdateAbsenceRanges( element.entryIds, - new Date("2023-01-03"), - new Date("2023-01-03") + element.startDate, + element.endDate ); toggleLoadingPage(false); }}