Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[pickers] Deprecate defaultCalendarMonth prop #11138

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion docs/pages/x/api/date-pickers/date-calendar.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,11 @@
"returned": "string"
}
},
"defaultCalendarMonth": { "type": { "name": "any" } },
"defaultCalendarMonth": {
"type": { "name": "any" },
"deprecated": true,
"deprecationInfo": "Consider using <code>referenceDate</code> instead."
},
"defaultValue": { "type": { "name": "any" } },
"disabled": { "type": { "name": "bool" } },
"disableFuture": { "type": { "name": "bool" } },
Expand Down
6 changes: 5 additions & 1 deletion docs/pages/x/api/date-pickers/date-picker.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,11 @@
"returned": "string"
}
},
"defaultCalendarMonth": { "type": { "name": "any" } },
"defaultCalendarMonth": {
"type": { "name": "any" },
"deprecated": true,
"deprecationInfo": "Consider using <code>referenceDate</code> instead."
},
"defaultValue": { "type": { "name": "any" } },
"desktopModeMediaQuery": {
"type": { "name": "string" },
Expand Down
6 changes: 5 additions & 1 deletion docs/pages/x/api/date-pickers/date-range-calendar.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,11 @@
"returned": "string"
}
},
"defaultCalendarMonth": { "type": { "name": "any" } },
"defaultCalendarMonth": {
"type": { "name": "any" },
"deprecated": true,
"deprecationInfo": "Consider using <code>referenceDate</code> instead."
},
"defaultRangePosition": {
"type": { "name": "enum", "description": "'end'<br>&#124;&nbsp;'start'" },
"default": "'start'"
Expand Down
6 changes: 5 additions & 1 deletion docs/pages/x/api/date-pickers/date-range-picker.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,11 @@
"returned": "string"
}
},
"defaultCalendarMonth": { "type": { "name": "any" } },
"defaultCalendarMonth": {
"type": { "name": "any" },
"deprecated": true,
"deprecationInfo": "Consider using <code>referenceDate</code> instead."
},
"defaultRangePosition": {
"type": { "name": "enum", "description": "'end'<br>&#124;&nbsp;'start'" },
"default": "'start'"
Expand Down
6 changes: 5 additions & 1 deletion docs/pages/x/api/date-pickers/date-time-picker.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,11 @@
"returned": "string"
}
},
"defaultCalendarMonth": { "type": { "name": "any" } },
"defaultCalendarMonth": {
"type": { "name": "any" },
"deprecated": true,
"deprecationInfo": "Consider using <code>referenceDate</code> instead."
},
"defaultValue": { "type": { "name": "any" } },
"desktopModeMediaQuery": {
"type": { "name": "string" },
Expand Down
6 changes: 5 additions & 1 deletion docs/pages/x/api/date-pickers/desktop-date-picker.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,11 @@
"returned": "string"
}
},
"defaultCalendarMonth": { "type": { "name": "any" } },
"defaultCalendarMonth": {
"type": { "name": "any" },
"deprecated": true,
"deprecationInfo": "Consider using <code>referenceDate</code> instead."
},
"defaultValue": { "type": { "name": "any" } },
"disabled": { "type": { "name": "bool" } },
"disableFuture": { "type": { "name": "bool" } },
Expand Down
6 changes: 5 additions & 1 deletion docs/pages/x/api/date-pickers/desktop-date-range-picker.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,11 @@
"returned": "string"
}
},
"defaultCalendarMonth": { "type": { "name": "any" } },
"defaultCalendarMonth": {
"type": { "name": "any" },
"deprecated": true,
"deprecationInfo": "Consider using <code>referenceDate</code> instead."
},
"defaultRangePosition": {
"type": { "name": "enum", "description": "'end'<br>&#124;&nbsp;'start'" },
"default": "'start'"
Expand Down
6 changes: 5 additions & 1 deletion docs/pages/x/api/date-pickers/desktop-date-time-picker.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,11 @@
"returned": "string"
}
},
"defaultCalendarMonth": { "type": { "name": "any" } },
"defaultCalendarMonth": {
"type": { "name": "any" },
"deprecated": true,
"deprecationInfo": "Consider using <code>referenceDate</code> instead."
},
"defaultValue": { "type": { "name": "any" } },
"disabled": { "type": { "name": "bool" } },
"disableFuture": { "type": { "name": "bool" } },
Expand Down
6 changes: 5 additions & 1 deletion docs/pages/x/api/date-pickers/mobile-date-picker.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,11 @@
"returned": "string"
}
},
"defaultCalendarMonth": { "type": { "name": "any" } },
"defaultCalendarMonth": {
"type": { "name": "any" },
"deprecated": true,
"deprecationInfo": "Consider using <code>referenceDate</code> instead."
},
"defaultValue": { "type": { "name": "any" } },
"disabled": { "type": { "name": "bool" } },
"disableFuture": { "type": { "name": "bool" } },
Expand Down
6 changes: 5 additions & 1 deletion docs/pages/x/api/date-pickers/mobile-date-range-picker.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,11 @@
"returned": "string"
}
},
"defaultCalendarMonth": { "type": { "name": "any" } },
"defaultCalendarMonth": {
"type": { "name": "any" },
"deprecated": true,
"deprecationInfo": "Consider using <code>referenceDate</code> instead."
},
"defaultRangePosition": {
"type": { "name": "enum", "description": "'end'<br>&#124;&nbsp;'start'" },
"default": "'start'"
Expand Down
6 changes: 5 additions & 1 deletion docs/pages/x/api/date-pickers/mobile-date-time-picker.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,11 @@
"returned": "string"
}
},
"defaultCalendarMonth": { "type": { "name": "any" } },
"defaultCalendarMonth": {
"type": { "name": "any" },
"deprecated": true,
"deprecationInfo": "Consider using <code>referenceDate</code> instead."
},
"defaultValue": { "type": { "name": "any" } },
"disabled": { "type": { "name": "bool" } },
"disableFuture": { "type": { "name": "bool" } },
Expand Down
6 changes: 5 additions & 1 deletion docs/pages/x/api/date-pickers/static-date-picker.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,11 @@
"returned": "string"
}
},
"defaultCalendarMonth": { "type": { "name": "any" } },
"defaultCalendarMonth": {
"type": { "name": "any" },
"deprecated": true,
"deprecationInfo": "Consider using <code>referenceDate</code> instead."
},
"defaultValue": { "type": { "name": "any" } },
"disabled": { "type": { "name": "bool" } },
"disableFuture": { "type": { "name": "bool" } },
Expand Down
6 changes: 5 additions & 1 deletion docs/pages/x/api/date-pickers/static-date-range-picker.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,11 @@
"returned": "string"
}
},
"defaultCalendarMonth": { "type": { "name": "any" } },
"defaultCalendarMonth": {
"type": { "name": "any" },
"deprecated": true,
"deprecationInfo": "Consider using <code>referenceDate</code> instead."
},
"defaultRangePosition": {
"type": { "name": "enum", "description": "'end'<br>&#124;&nbsp;'start'" },
"default": "'start'"
Expand Down
6 changes: 5 additions & 1 deletion docs/pages/x/api/date-pickers/static-date-time-picker.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,11 @@
"returned": "string"
}
},
"defaultCalendarMonth": { "type": { "name": "any" } },
"defaultCalendarMonth": {
"type": { "name": "any" },
"deprecated": true,
"deprecationInfo": "Consider using <code>referenceDate</code> instead."
},
"defaultValue": { "type": { "name": "any" } },
"disabled": { "type": { "name": "bool" } },
"disableFuture": { "type": { "name": "bool" } },
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -646,6 +646,7 @@ DateRangeCalendar.propTypes = {
dayOfWeekFormatter: PropTypes.func,
/**
* Default calendar month displayed when `value={[null, null]}`.
* @deprecated Consider using `referenceDate` instead.
*/
defaultCalendarMonth: PropTypes.any,
/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ export interface ExportedDateRangeCalendarProps<TDate>
disableAutoMonthSwitching?: boolean;
/**
* Default calendar month displayed when `value={[null, null]}`.
* @deprecated Consider using `referenceDate` instead.
*/
defaultCalendarMonth?: TDate;
/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ DateRangePicker.propTypes = {
dayOfWeekFormatter: PropTypes.func,
/**
* Default calendar month displayed when `value={[null, null]}`.
* @deprecated Consider using `referenceDate` instead.
*/
defaultCalendarMonth: PropTypes.any,
/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,7 @@ DesktopDateRangePicker.propTypes = {
dayOfWeekFormatter: PropTypes.func,
/**
* Default calendar month displayed when `value={[null, null]}`.
* @deprecated Consider using `referenceDate` instead.
*/
defaultCalendarMonth: PropTypes.any,
/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,7 @@ MobileDateRangePicker.propTypes = {
dayOfWeekFormatter: PropTypes.func,
/**
* Default calendar month displayed when `value={[null, null]}`.
* @deprecated Consider using `referenceDate` instead.
*/
defaultCalendarMonth: PropTypes.any,
/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ StaticDateRangePicker.propTypes = {
dayOfWeekFormatter: PropTypes.func,
/**
* Default calendar month displayed when `value={[null, null]}`.
* @deprecated Consider using `referenceDate` instead.
*/
defaultCalendarMonth: PropTypes.any,
/**
Expand Down
1 change: 1 addition & 0 deletions packages/x-date-pickers/src/DateCalendar/DateCalendar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -442,6 +442,7 @@ DateCalendar.propTypes = {
dayOfWeekFormatter: PropTypes.func,
/**
* Default calendar month displayed when `value` and `defaultValue` are empty.
* @deprecated Consider using `referenceDate` instead.
*/
defaultCalendarMonth: PropTypes.any,
/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ export interface ExportedDateCalendarProps<TDate>
TimezoneProps {
/**
* Default calendar month displayed when `value` and `defaultValue` are empty.
* @deprecated Consider using `referenceDate` instead.
*/
defaultCalendarMonth?: TDate;
/**
Expand Down
1 change: 1 addition & 0 deletions packages/x-date-pickers/src/DatePicker/DatePicker.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ DatePicker.propTypes = {
dayOfWeekFormatter: PropTypes.func,
/**
* Default calendar month displayed when `value` and `defaultValue` are empty.
* @deprecated Consider using `referenceDate` instead.
*/
defaultCalendarMonth: PropTypes.any,
/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ DateTimePicker.propTypes = {
dayOfWeekFormatter: PropTypes.func,
/**
* Default calendar month displayed when `value` and `defaultValue` are empty.
* @deprecated Consider using `referenceDate` instead.
*/
defaultCalendarMonth: PropTypes.any,
/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,7 @@ DesktopDatePicker.propTypes = {
dayOfWeekFormatter: PropTypes.func,
/**
* Default calendar month displayed when `value` and `defaultValue` are empty.
* @deprecated Consider using `referenceDate` instead.
*/
defaultCalendarMonth: PropTypes.any,
/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,7 @@ DesktopDateTimePicker.propTypes = {
dayOfWeekFormatter: PropTypes.func,
/**
* Default calendar month displayed when `value` and `defaultValue` are empty.
* @deprecated Consider using `referenceDate` instead.
*/
defaultCalendarMonth: PropTypes.any,
/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,7 @@ MobileDatePicker.propTypes = {
dayOfWeekFormatter: PropTypes.func,
/**
* Default calendar month displayed when `value` and `defaultValue` are empty.
* @deprecated Consider using `referenceDate` instead.
*/
defaultCalendarMonth: PropTypes.any,
/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,7 @@ MobileDateTimePicker.propTypes = {
dayOfWeekFormatter: PropTypes.func,
/**
* Default calendar month displayed when `value` and `defaultValue` are empty.
* @deprecated Consider using `referenceDate` instead.
*/
defaultCalendarMonth: PropTypes.any,
/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ StaticDatePicker.propTypes = {
dayOfWeekFormatter: PropTypes.func,
/**
* Default calendar month displayed when `value` and `defaultValue` are empty.
* @deprecated Consider using `referenceDate` instead.
*/
defaultCalendarMonth: PropTypes.any,
/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,7 @@ StaticDateTimePicker.propTypes = {
dayOfWeekFormatter: PropTypes.func,
/**
* Default calendar month displayed when `value` and `defaultValue` are empty.
* @deprecated Consider using `referenceDate` instead.
*/
defaultCalendarMonth: PropTypes.any,
/**
Expand Down
Loading