1
0
Fork 0
mirror of synced 2024-09-29 08:41:16 +13:00

Removed step that alters the picker date on change for time only fields

This commit is contained in:
Dean 2022-04-04 14:55:43 +01:00
parent bb0e1ef769
commit c3f66ebaa8

View file

@ -54,10 +54,9 @@
if (newValue) {
newValue = newValue.toISOString()
}
// if time only set date component to today
// if time only set date component to 2000-01-01
if (timeOnly) {
const todayDate = new Date().toISOString().split("T")[0]
newValue = `${todayDate}T${newValue.split("T")[1]}`
newValue = `2000-01-01T${newValue.split("T")[1]}`
}
dispatch("change", newValue)
}