Skip to content

Commit

Permalink
fix unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
mkhutornyi committed Dec 13, 2023
1 parent d763544 commit 98bdf2a
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 = parseISO(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 98bdf2a

Please sign in to comment.