1
0
mirror of https://github.com/LaCasemate/fab-manager.git synced 2025-01-30 19:52:20 +01:00

Merge pull request #445 from Guichaguri/fix/event-date-timezone

(Bug) Fix event date being changed to a day before from the browser timezone
This commit is contained in:
Sylvain 2023-03-20 10:49:29 +01:00 committed by GitHub
commit 9409de4fa0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -65,7 +65,7 @@ export const FormInput = <TFieldValues extends FieldValues, TInputType>({ id, re
return num;
}
if (type === 'date') {
const date: Date = new Date(value);
const date: Date = new Date(value + 'T00:00:00');
if (Number.isNaN(date) && nullable) {
return null;
}