Skip to content

Commit

Permalink
Merge pull request #32889 from mkhutornyi/fix-32535
Browse files Browse the repository at this point in the history
fix previous month display on calendar after coming back to form
  • Loading branch information
puneetlath authored Dec 28, 2023
2 parents f8d75dc + 98bdf2a commit 4ac7b3f
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 = typeof props.value === 'string' ? parseISO(props.value) : new Date(props.value);
if (props.maxDate < currentDateView) {
currentDateView = props.maxDate;
} else if (props.minDate > currentDateView) {
Expand Down

0 comments on commit 4ac7b3f

Please sign in to comment.