mirror of
https://github.com/tomru/pfadi-bussle.git
synced 2026-03-04 15:07:13 +01:00
remove multipleDays choice
This commit is contained in:
@@ -55,7 +55,6 @@ export default function DateSelect() {
|
|||||||
toRef.current?.getInput().focus()
|
toRef.current?.getInput().focus()
|
||||||
}, [range.from])
|
}, [range.from])
|
||||||
|
|
||||||
const { multipleDays } = state.formData
|
|
||||||
const { from, to } = range
|
const { from, to } = range
|
||||||
const disabledDays = [dayDisabled]
|
const disabledDays = [dayDisabled]
|
||||||
const modifiers = {
|
const modifiers = {
|
||||||
@@ -74,51 +73,10 @@ export default function DateSelect() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
|
||||||
<Form.Group controlId="dateSelect">
|
|
||||||
<Form.Label>
|
|
||||||
Willst du einen odere mehrere Tage buchen? <Required />
|
|
||||||
</Form.Label>
|
|
||||||
<Form.Check
|
|
||||||
type="radio"
|
|
||||||
id={'multipleDays-single'}
|
|
||||||
label="Einen Tag"
|
|
||||||
name="multipleDays"
|
|
||||||
value="single"
|
|
||||||
checked={multipleDays === false}
|
|
||||||
onChange={() => {
|
|
||||||
//setFocusedInput(null)
|
|
||||||
onChange({
|
|
||||||
multipleDays: false,
|
|
||||||
startDate: null,
|
|
||||||
endDate: null,
|
|
||||||
})
|
|
||||||
}}
|
|
||||||
/>
|
|
||||||
<Form.Check
|
|
||||||
type="radio"
|
|
||||||
id={'multipleDays-multiple'}
|
|
||||||
label="Mehrere Tage"
|
|
||||||
name="multipleDays"
|
|
||||||
value="multiple"
|
|
||||||
checked={multipleDays === true}
|
|
||||||
onChange={() => {
|
|
||||||
//setFocusedInput(null)
|
|
||||||
onChange({
|
|
||||||
multipleDays: true,
|
|
||||||
startDate: null,
|
|
||||||
endDate: null,
|
|
||||||
})
|
|
||||||
}}
|
|
||||||
/>
|
|
||||||
</Form.Group>
|
|
||||||
{multipleDays !== null && (
|
|
||||||
<Form.Group>
|
<Form.Group>
|
||||||
<Form.Label component="legend" style={{ display: 'block' }}>
|
<Form.Label component="legend" style={{ display: 'block' }}>
|
||||||
Datum <Required />
|
Datum <Required />
|
||||||
</Form.Label>
|
</Form.Label>
|
||||||
{
|
|
||||||
<>
|
|
||||||
<Form.Group>
|
<Form.Group>
|
||||||
<DayPickerInput
|
<DayPickerInput
|
||||||
ref={fromRef}
|
ref={fromRef}
|
||||||
@@ -140,7 +98,7 @@ export default function DateSelect() {
|
|||||||
<DayPickerInput
|
<DayPickerInput
|
||||||
ref={toRef}
|
ref={toRef}
|
||||||
component={Form.Control}
|
component={Form.Control}
|
||||||
inputProps={{ disabled: !range.from }}
|
inputProps={{ disabled: !from }}
|
||||||
value={to}
|
value={to}
|
||||||
placeholder="Bis"
|
placeholder="Bis"
|
||||||
formatDate={dateFormat}
|
formatDate={dateFormat}
|
||||||
@@ -164,10 +122,6 @@ export default function DateSelect() {
|
|||||||
Zurücksetzen
|
Zurücksetzen
|
||||||
</Button>
|
</Button>
|
||||||
</Form.Group>
|
</Form.Group>
|
||||||
</>
|
|
||||||
}
|
|
||||||
</Form.Group>
|
</Form.Group>
|
||||||
)}
|
|
||||||
</>
|
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -63,7 +63,6 @@ const initialState = {
|
|||||||
postDataError: null,
|
postDataError: null,
|
||||||
postDataSuccess: null,
|
postDataSuccess: null,
|
||||||
formData: {
|
formData: {
|
||||||
multipleDays: true,
|
|
||||||
//startDate: '2020-08-10',
|
//startDate: '2020-08-10',
|
||||||
//endDate: '2020-08-17',
|
//endDate: '2020-08-17',
|
||||||
//purpose: 'Sommerlager 2021',
|
//purpose: 'Sommerlager 2021',
|
||||||
|
|||||||
Reference in New Issue
Block a user