Skip to content

Commit

Permalink
Fix dob date picker increasing selected date by a month
Browse files Browse the repository at this point in the history
  • Loading branch information
makombe committed Jul 16, 2024
1 parent 15c5e1a commit 14afb68
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ export const DobField: React.FC = () => {

const onDateChange = useCallback(
(birthdate: CalendarDate) => {
setFieldValue('birthdate', new Date(birthdate.year, birthdate.month, birthdate.day, 0, 0, 0, 0));
setFieldValue('birthdate', birthdate?.toDate(getLocalTimeZone()));
},
[setFieldValue],
);
Expand Down

0 comments on commit 14afb68

Please sign in to comment.