We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ebb4c29 commit 6f97511Copy full SHA for 6f97511
src/shared/components/GUIKit/Datepicker/index.jsx
@@ -41,7 +41,7 @@ function Datepicker({
41
date={date}
42
onDateChange={(changedDate) => {
43
setDate(changedDate);
44
- onChange(changedDate.toDate());
+ onChange(changedDate ? changedDate.toDate() : null);
45
}}
46
focused={focused}
47
onFocusChange={({ focused: changedFocused }) => setFocused(changedFocused)
src/shared/components/Gigs/GigApply/index.jsx
@@ -176,7 +176,7 @@ export default function GigApply(props) {
176
<Datepicker
177
placeholder="Available From"
178
label="Available From"
179
- onChange={val => onFormInputChange('availFrom', val.toISOString())}
+ onChange={val => onFormInputChange('availFrom', val ? val.toISOString() : null)}
180
errorMsg={formErrors.availFrom}
181
value={formData.availFrom}
182
/>
0 commit comments