You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
Since the update to v6.3.0, we have noticed that when minTime is set, it is no longer possible to set the time by typing it into the input field: As soon as the input field loses focus, the time value displayed changes to the given minTime value.
Setting the date via typing still works just fine, as does setting the time by clicking the respective item in the selection list.
It seems that this issue is due to the changes in this pull request; in particular, when we use a custom version of react-datepicker where the following lines in src/index.jsx are removed, the issue disappears:
// If minTime is present then set the time to minTime
if (this.props.showTimeSelect || this.props.showTimeSelectOnly) {
if (minTime) {
changedDate = setTime(changedDate, {
hour: minTime.getHours(),
minute: minTime.getMinutes(),
second: minTime.getSeconds(),
});
}
}
Describe the bug
Since the update to v6.3.0, we have noticed that when
minTime
is set, it is no longer possible to set the time by typing it into the input field: As soon as the input field loses focus, the time value displayed changes to the givenminTime
value.Setting the date via typing still works just fine, as does setting the time by clicking the respective item in the selection list.
It seems that this issue is due to the changes in this pull request; in particular, when we use a custom version of
react-datepicker
where the following lines insrc/index.jsx
are removed, the issue disappears:To Reproduce
I have prepared a sandbox with an example datepicker that can be used to reproduce the behavior.
Steps to reproduce the behavior:
10:00
)06:00
, which corresponds to theminTime
value set in the example.Expected behavior
The time displayed should be the time that the user typed in.
The text was updated successfully, but these errors were encountered: