Browse Source

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

pull/5232/head
Dean 4 years ago
parent
commit
c3f66ebaa8
  1. 5
      packages/bbui/src/Form/Core/DatePicker.svelte

5
packages/bbui/src/Form/Core/DatePicker.svelte

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

Loading…
Cancel
Save