File tree Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -41,7 +41,7 @@ function Datepicker({
41
41
date = { date }
42
42
onDateChange = { ( changedDate ) => {
43
43
setDate ( changedDate ) ;
44
- onChange ( changedDate . toDate ( ) ) ;
44
+ onChange ( changedDate ? changedDate . toDate ( ) : null ) ;
45
45
} }
46
46
focused = { focused }
47
47
onFocusChange = { ( { focused : changedFocused } ) => setFocused ( changedFocused )
Original file line number Diff line number Diff line change @@ -176,7 +176,7 @@ export default function GigApply(props) {
176
176
< Datepicker
177
177
placeholder = "Available From"
178
178
label = "Available From"
179
- onChange = { val => onFormInputChange ( 'availFrom' , val . toISOString ( ) ) }
179
+ onChange = { val => onFormInputChange ( 'availFrom' , val ? val . toISOString ( ) : null ) }
180
180
errorMsg = { formErrors . availFrom }
181
181
value = { formData . availFrom }
182
182
/>
You can’t perform that action at this time.
0 commit comments