From f1ef162350f0936196c31dae4afda8e7c6d5b639 Mon Sep 17 00:00:00 2001 From: Michel Engelen <32863416+michelengelen@users.noreply.github.com> Date: Wed, 1 Nov 2023 10:38:47 +0100 Subject: [PATCH] [pickers] Add reference links to calendar components (#10644) Signed-off-by: Michel Engelen <32863416+michelengelen@users.noreply.github.com> Co-authored-by: Lukas --- docs/data/date-pickers/date-picker/date-picker.md | 2 +- docs/data/date-pickers/validation/validation.md | 2 +- docs/pages/x/api/date-pickers/date-calendar.json | 2 +- .../src/DateRangeCalendar/DateRangeCalendar.tsx | 10 ++++++++++ .../x-date-pickers/src/DateCalendar/DateCalendar.tsx | 5 +++-- .../x-date-pickers/src/MonthCalendar/MonthCalendar.tsx | 9 +++++++++ .../x-date-pickers/src/YearCalendar/YearCalendar.tsx | 9 +++++++++ 7 files changed, 34 insertions(+), 5 deletions(-) diff --git a/docs/data/date-pickers/date-picker/date-picker.md b/docs/data/date-pickers/date-picker/date-picker.md index aaf872be9b28..85018f5efc0b 100644 --- a/docs/data/date-pickers/date-picker/date-picker.md +++ b/docs/data/date-pickers/date-picker/date-picker.md @@ -1,7 +1,7 @@ --- productId: x-date-pickers title: React Date Picker component -components: DatePicker, DesktopDatePicker, MobileDatePicker, StaticDatePicker +components: DatePicker, DesktopDatePicker, MobileDatePicker, StaticDatePicker, DateCalendar githubLabel: 'component: DatePicker' packageName: '@mui/x-date-pickers' materialDesign: https://m2.material.io/components/date-pickers diff --git a/docs/data/date-pickers/validation/validation.md b/docs/data/date-pickers/validation/validation.md index 40d03c34de12..1d16bec6a620 100644 --- a/docs/data/date-pickers/validation/validation.md +++ b/docs/data/date-pickers/validation/validation.md @@ -1,6 +1,6 @@ --- productId: x-date-pickers -components: DatePicker, DesktopDatePicker, MobileDatePicker, StaticDatePicker, TimePicker, DesktopTimePicker, MobileTimePicker, StaticTimePicker, DateTimePicker, DesktopDateTimePicker, MobileDateTimePicker, StaticDateTimePicker, DateRangePicker, DesktopDateRangePicker, MobileDateRangePicker, StaticDateRangePicker +components: DatePicker, DesktopDatePicker, MobileDatePicker, StaticDatePicker, TimePicker, DesktopTimePicker, MobileTimePicker, StaticTimePicker, DateTimePicker, DesktopDateTimePicker, MobileDateTimePicker, StaticDateTimePicker, DateRangePicker, DesktopDateRangePicker, MobileDateRangePicker, StaticDateRangePicker, DateCalendar githubLabel: 'component: pickers' packageName: '@mui/x-date-pickers' --- diff --git a/docs/pages/x/api/date-pickers/date-calendar.json b/docs/pages/x/api/date-pickers/date-calendar.json index 0d8e73ac44bd..baf4efe60d43 100644 --- a/docs/pages/x/api/date-pickers/date-calendar.json +++ b/docs/pages/x/api/date-pickers/date-calendar.json @@ -214,5 +214,5 @@ "forwardsRefTo": "HTMLDivElement", "filename": "/packages/x-date-pickers/src/DateCalendar/DateCalendar.tsx", "inheritance": null, - "demos": "" + "demos": "" } diff --git a/packages/x-date-pickers-pro/src/DateRangeCalendar/DateRangeCalendar.tsx b/packages/x-date-pickers-pro/src/DateRangeCalendar/DateRangeCalendar.tsx index 77881240d36d..004a70c8c793 100644 --- a/packages/x-date-pickers-pro/src/DateRangeCalendar/DateRangeCalendar.tsx +++ b/packages/x-date-pickers-pro/src/DateRangeCalendar/DateRangeCalendar.tsx @@ -155,6 +155,16 @@ type DateRangeCalendarComponent = (( props: DateRangeCalendarProps & React.RefAttributes, ) => React.JSX.Element) & { propTypes?: any }; +/** + * Demos: + * + * - [DateRangePicker](https://mui.com/x/react-date-pickers/date-range-picker/) + * - [DateRangeCalendar](https://mui.com/x/react-date-pickers/date-range-calendar/) + * + * API: + * + * - [DateRangeCalendar API](https://mui.com/x/api/date-pickers/date-range-calendar/) + */ const DateRangeCalendar = React.forwardRef(function DateRangeCalendar( inProps: DateRangeCalendarProps, ref: React.Ref, diff --git a/packages/x-date-pickers/src/DateCalendar/DateCalendar.tsx b/packages/x-date-pickers/src/DateCalendar/DateCalendar.tsx index ab402c9977ab..f78b9323b094 100644 --- a/packages/x-date-pickers/src/DateCalendar/DateCalendar.tsx +++ b/packages/x-date-pickers/src/DateCalendar/DateCalendar.tsx @@ -88,10 +88,11 @@ type DateCalendarComponent = (( ) => React.JSX.Element) & { propTypes?: any }; /** - * * Demos: * - * - [Date Picker](https://mui.com/x/react-date-pickers/date-picker/) + * - [DatePicker](https://mui.com/x/react-date-pickers/date-picker/) + * - [DateCalendar](https://mui.com/x/react-date-pickers/date-calendar/) + * - [Validation](https://mui.com/x/react-date-pickers/validation/) * * API: * diff --git a/packages/x-date-pickers/src/MonthCalendar/MonthCalendar.tsx b/packages/x-date-pickers/src/MonthCalendar/MonthCalendar.tsx index 126dc0380d95..a884d19452aa 100644 --- a/packages/x-date-pickers/src/MonthCalendar/MonthCalendar.tsx +++ b/packages/x-date-pickers/src/MonthCalendar/MonthCalendar.tsx @@ -70,6 +70,15 @@ type MonthCalendarComponent = (( props: MonthCalendarProps & React.RefAttributes, ) => React.JSX.Element) & { propTypes?: any }; +/** + * Demos: + * + * - [DateCalendar](https://mui.com/x/react-date-pickers/date-calendar/) + * + * API: + * + * - [MonthCalendar API](https://mui.com/x/api/date-pickers/month-calendar/) + */ export const MonthCalendar = React.forwardRef(function MonthCalendar( inProps: MonthCalendarProps, ref: React.Ref, diff --git a/packages/x-date-pickers/src/YearCalendar/YearCalendar.tsx b/packages/x-date-pickers/src/YearCalendar/YearCalendar.tsx index b3a6c069f4b1..bf6b925ac9c3 100644 --- a/packages/x-date-pickers/src/YearCalendar/YearCalendar.tsx +++ b/packages/x-date-pickers/src/YearCalendar/YearCalendar.tsx @@ -76,6 +76,15 @@ type YearCalendarComponent = ((props: YearCalendarProps) => React. propTypes?: any; }; +/** + * Demos: + * + * - [DateCalendar](https://mui.com/x/react-date-pickers/date-calendar/) + * + * API: + * + * - [YearCalendar API](https://mui.com/x/api/date-pickers/year-calendar/) + */ export const YearCalendar = React.forwardRef(function YearCalendar( inProps: YearCalendarProps, ref: React.Ref,