We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6b75e1e commit 16f482bCopy full SHA for 16f482b
src/components/datepicker.js
@@ -95,10 +95,18 @@ class SemanticDatepicker extends React.Component {
95
96
resetState = () => {
97
const { onDateChange } = this.props;
98
+ const initialSelectedDate = this.isRangeInput ? [] : null;
99
- this.setState(this.initialState, () => {
100
- onDateChange(null);
101
- });
+ this.setState(
+ {
102
+ isVisible: false,
103
+ selectedDate: initialSelectedDate,
104
+ selectedDateFormatted: '',
105
+ },
106
+ () => {
107
+ onDateChange(null);
108
+ }
109
+ );
110
};
111
112
mousedownCb = mousedownEvent => {
0 commit comments