make dates required

This commit is contained in:
Thomas Ruoff
2020-08-30 21:54:11 +02:00
committed by Thomas Ruoff
parent 4b16e07985
commit aeb03f3330

View File

@@ -77,7 +77,7 @@ export default function DateSelect() {
</label> </label>
<DayPickerInput <DayPickerInput
ref={fromRef} ref={fromRef}
inputProps={{ className: 'input-text' }} inputProps={{ className: 'input-text', required: true }}
value={from} value={from}
placeholder="Von" placeholder="Von"
formatDate={MomentLocaleUtils.formatDate} formatDate={MomentLocaleUtils.formatDate}
@@ -95,7 +95,11 @@ export default function DateSelect() {
{' - '} {' - '}
<DayPickerInput <DayPickerInput
ref={toRef} ref={toRef}
inputProps={{ className: 'input-text', disabled: !from }} inputProps={{
className: 'input-text',
disabled: !from,
required: true,
}}
value={to} value={to}
placeholder="Bis" placeholder="Bis"
formatDate={MomentLocaleUtils.formatDate} formatDate={MomentLocaleUtils.formatDate}