Remove timezone formatting for date picker entry. (#12163)

This commit is contained in:
kialam 2022-05-05 13:46:38 -07:00 committed by GitHub
parent 162e09972f
commit f7be6b6423
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -27,7 +27,7 @@ function DateTimePicker({ dateFieldName, timeFieldName, label }) {
const onDateChange = (inputDate, newDate) => {
dateHelpers.setTouched();
if (isValidDate(newDate) && inputDate === yyyyMMddFormat(newDate)) {
dateHelpers.setValue(new Date(newDate).toISOString().split('T')[0]);
dateHelpers.setValue(inputDate);
}
};