Skip to content

Commit

Permalink
Clearing internal state after resetting the value #261
Browse files Browse the repository at this point in the history
  • Loading branch information
shahabyazdi committed Jun 15, 2024
1 parent 9b5e13c commit eb95ecf
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# 4.5.2

- Type of selected date fixed in MapDaysProps
- Clearing internal state after resetting the value [#261](https://github.com/shahabyazdi/react-multi-date-picker/issues/261)

# 4.5.1

Expand Down
2 changes: 2 additions & 0 deletions src/components/date_picker/date_picker.js
Original file line number Diff line number Diff line change
Expand Up @@ -281,6 +281,8 @@ function DatePicker(
if (ref.current.mobile && datePickerRef.current.isOpen) {
setTemporaryDate(date);
} else {
ref.current.validInputValue = undefined;

setDate(date);
}
}, [
Expand Down

0 comments on commit eb95ecf

Please sign in to comment.