Skip to content

Commit

Permalink
Fix input not updating the value when blurred and the date doesn’t ch…
Browse files Browse the repository at this point in the history
…ange
  • Loading branch information
hernansartorio committed May 8, 2020
1 parent ef818fb commit dc2e010
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/useDateInput.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ export default function useDateInput({
if (!focused) {
setValue(isValidAndSelectable(selectedDate) ? formatDate(selectedDate) : '')
}
}, [selectedDate]) // eslint-disable-line react-hooks/exhaustive-deps
}, [selectedDate, focused]) // eslint-disable-line react-hooks/exhaustive-deps

return {
onFocus: handleFocus,
Expand Down

0 comments on commit dc2e010

Please sign in to comment.