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:
parent
ba97de18d3
commit
4f8af521d9
@ -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;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user