Skip to content

Commit

Permalink
fix previous month display on calendar after coming back to form
Browse files Browse the repository at this point in the history
  • Loading branch information
mkhutornyi committed Dec 12, 2023
1 parent 86a2521 commit 62b7acd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/DatePicker/CalendarPicker/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ class CalendarPicker extends React.PureComponent {
if (props.minDate >= props.maxDate) {
throw new Error('Minimum date cannot be greater than the maximum date.');
}
let currentDateView = new Date(props.value);
let currentDateView = parseISO(props.value);
if (props.maxDate < currentDateView) {
currentDateView = props.maxDate;
} else if (props.minDate > currentDateView) {
Expand Down

0 comments on commit 62b7acd

Please sign in to comment.