Skip to content

Commit 6f97511

Browse files
committed
Date picker fixes
1 parent ebb4c29 commit 6f97511

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/shared/components/GUIKit/Datepicker/index.jsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ function Datepicker({
4141
date={date}
4242
onDateChange={(changedDate) => {
4343
setDate(changedDate);
44-
onChange(changedDate.toDate());
44+
onChange(changedDate ? changedDate.toDate() : null);
4545
}}
4646
focused={focused}
4747
onFocusChange={({ focused: changedFocused }) => setFocused(changedFocused)

src/shared/components/Gigs/GigApply/index.jsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ export default function GigApply(props) {
176176
<Datepicker
177177
placeholder="Available From"
178178
label="Available From"
179-
onChange={val => onFormInputChange('availFrom', val.toISOString())}
179+
onChange={val => onFormInputChange('availFrom', val ? val.toISOString() : null)}
180180
errorMsg={formErrors.availFrom}
181181
value={formData.availFrom}
182182
/>

0 commit comments

Comments
 (0)