1
0
mirror of https://github.com/LaCasemate/fab-manager.git synced 2025-01-18 07:52:23 +01:00

(Bug) Fix date input offsetting by the frontend timezone

This commit is contained in:
Guilherme Chaguri 2023-03-17 10:05:58 -03:00
parent ba97de18d3
commit 4f8af521d9

View File

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