Skip to content

Commit

Permalink
Fix primefaces#1661: Calendar do not navigate past min and max
Browse files Browse the repository at this point in the history
  • Loading branch information
melloware committed Jul 1, 2022
1 parent 4a983cf commit e475dc0
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions api-generator/components/calendar.js
Original file line number Diff line number Diff line change
Expand Up @@ -282,9 +282,9 @@ const CalendarProps = [
description: 'Maximum number of selectable dates in multiple mode.'
},
{
name: 'showOutliers',
name: 'showMinMaxRange',
type: 'boolean',
default: 'true',
default: 'false',
description: 'Whether to allow navigation past min/max dates.'
},
{
Expand Down
4 changes: 2 additions & 2 deletions components/doc/calendar/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -1108,9 +1108,9 @@ const monthNavigatorTemplate = (options) => {
<td>Maximum number of selectable dates in multiple mode.</td>
</tr>
<tr>
<td>showOutliers</td>
<td>showMinMaxRange</td>
<td>boolean</td>
<td>true</td>
<td>false</td>
<td>Whether to allow navigation past min/max dates.</td>
</tr>
<tr>
Expand Down
2 changes: 1 addition & 1 deletion components/lib/calendar/Calendar.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ export interface CalendarProps {
minDate?: Date;
maxDate?: Date;
maxDateCount?: number;
showOutliers?: boolean;
showMinMaxRange?: boolean;
showOtherMonths?: boolean;
selectOtherMonths?: boolean;
showButtonBar?: boolean;
Expand Down
4 changes: 2 additions & 2 deletions components/lib/calendar/Calendar.js
Original file line number Diff line number Diff line change
Expand Up @@ -948,7 +948,7 @@ export const Calendar = React.memo(React.forwardRef((props, ref) => {
}

const setNavigationState = (newViewDate) => {
if (!props.showOutliers || props.view !== 'date' || !overlayRef.current) {
if (!props.showMinMaxRange || props.view !== 'date' || !overlayRef.current) {
return;
}

Expand Down Expand Up @@ -3160,7 +3160,7 @@ Calendar.defaultProps = {
minDate: null,
maxDate: null,
maxDateCount: null,
showOutliers: true,
showMinMaxRange: false,
showOtherMonths: true,
selectOtherMonths: false,
showButtonBar: false,
Expand Down

0 comments on commit e475dc0

Please sign in to comment.