diff --git a/components/dateSelect.js b/components/dateSelect.js index 5e01ace..8958a40 100644 --- a/components/dateSelect.js +++ b/components/dateSelect.js @@ -55,7 +55,6 @@ export default function DateSelect() { toRef.current?.getInput().focus() }, [range.from]) - const { multipleDays } = state.formData const { from, to } = range const disabledDays = [dayDisabled] const modifiers = { @@ -74,100 +73,55 @@ export default function DateSelect() { } return ( - <> - - - Willst du einen odere mehrere Tage buchen? - - { - //setFocusedInput(null) - onChange({ - multipleDays: false, - startDate: null, - endDate: null, - }) + + + Datum + + + setRange({ ...range, from })} /> - { - //setFocusedInput(null) - onChange({ - multipleDays: true, - startDate: null, - endDate: null, - }) + bis + setRange({ ...range, to })} /> + - {multipleDays !== null && ( - - - Datum - - { - <> - - setRange({ ...range, from })} - /> - bis - setRange({ ...range, to })} - /> - - - - } - - )} - + ) } diff --git a/context/wizardStore.js b/context/wizardStore.js index ab386e6..724ed8f 100644 --- a/context/wizardStore.js +++ b/context/wizardStore.js @@ -63,7 +63,6 @@ const initialState = { postDataError: null, postDataSuccess: null, formData: { - multipleDays: true, //startDate: '2020-08-10', //endDate: '2020-08-17', //purpose: 'Sommerlager 2021',