@mui/x-date-pickers 6.16.1 → 6.16.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (240) hide show
  1. package/AdapterDayjs/AdapterDayjs.js +6 -4
  2. package/AdapterMoment/AdapterMoment.js +2 -5
  3. package/CHANGELOG.md +169 -0
  4. package/DateField/DateField.d.ts +10 -0
  5. package/DateField/DateField.js +11 -1
  6. package/DatePicker/DatePicker.d.ts +10 -0
  7. package/DatePicker/DatePicker.js +10 -0
  8. package/DatePicker/DatePickerToolbar.d.ts +10 -0
  9. package/DatePicker/DatePickerToolbar.js +10 -0
  10. package/DateTimeField/DateTimeField.d.ts +10 -0
  11. package/DateTimeField/DateTimeField.js +11 -1
  12. package/DateTimePicker/DateTimePicker.d.ts +10 -0
  13. package/DateTimePicker/DateTimePicker.js +15 -0
  14. package/DateTimePicker/DateTimePickerTabs.d.ts +10 -0
  15. package/DateTimePicker/DateTimePickerTabs.js +11 -0
  16. package/DateTimePicker/DateTimePickerToolbar.d.ts +10 -0
  17. package/DateTimePicker/DateTimePickerToolbar.js +11 -0
  18. package/DayCalendarSkeleton/DayCalendarSkeleton.d.ts +1 -2
  19. package/DayCalendarSkeleton/DayCalendarSkeleton.js +1 -2
  20. package/DesktopDatePicker/DesktopDatePicker.d.ts +10 -0
  21. package/DesktopDatePicker/DesktopDatePicker.js +10 -0
  22. package/DesktopDateTimePicker/DesktopDateTimePicker.d.ts +10 -0
  23. package/DesktopDateTimePicker/DesktopDateTimePicker.js +25 -7
  24. package/DesktopDateTimePicker/DesktopDateTimePicker.types.d.ts +4 -3
  25. package/DesktopTimePicker/DesktopTimePicker.d.ts +10 -0
  26. package/DesktopTimePicker/DesktopTimePicker.js +18 -9
  27. package/DigitalClock/DigitalClock.d.ts +10 -0
  28. package/DigitalClock/DigitalClock.js +11 -1
  29. package/LocalizationProvider/LocalizationProvider.d.ts +12 -0
  30. package/LocalizationProvider/LocalizationProvider.js +12 -0
  31. package/MobileDatePicker/MobileDatePicker.d.ts +10 -0
  32. package/MobileDatePicker/MobileDatePicker.js +10 -0
  33. package/MobileDateTimePicker/MobileDateTimePicker.d.ts +10 -0
  34. package/MobileDateTimePicker/MobileDateTimePicker.js +10 -0
  35. package/MobileTimePicker/MobileTimePicker.d.ts +10 -0
  36. package/MobileTimePicker/MobileTimePicker.js +10 -0
  37. package/MultiSectionDigitalClock/MultiSectionDigitalClock.d.ts +10 -0
  38. package/MultiSectionDigitalClock/MultiSectionDigitalClock.js +10 -0
  39. package/PickersActionBar/PickersActionBar.d.ts +10 -0
  40. package/PickersActionBar/PickersActionBar.js +10 -0
  41. package/PickersCalendarHeader/PickersCalendarHeader.d.ts +11 -0
  42. package/PickersCalendarHeader/PickersCalendarHeader.js +11 -0
  43. package/PickersDay/PickersDay.d.ts +1 -3
  44. package/PickersDay/PickersDay.js +1 -3
  45. package/PickersLayout/PickersLayout.d.ts +9 -0
  46. package/PickersLayout/PickersLayout.js +10 -0
  47. package/PickersShortcuts/PickersShortcuts.d.ts +9 -0
  48. package/PickersShortcuts/PickersShortcuts.js +9 -0
  49. package/StaticDatePicker/StaticDatePicker.d.ts +10 -0
  50. package/StaticDatePicker/StaticDatePicker.js +10 -0
  51. package/StaticDateTimePicker/StaticDateTimePicker.d.ts +10 -0
  52. package/StaticDateTimePicker/StaticDateTimePicker.js +10 -0
  53. package/StaticTimePicker/StaticTimePicker.d.ts +10 -0
  54. package/StaticTimePicker/StaticTimePicker.js +10 -0
  55. package/TimeClock/TimeClock.d.ts +4 -0
  56. package/TimeClock/TimeClock.js +4 -0
  57. package/TimeField/TimeField.d.ts +10 -0
  58. package/TimeField/TimeField.js +11 -1
  59. package/TimePicker/TimePicker.d.ts +10 -0
  60. package/TimePicker/TimePicker.js +10 -0
  61. package/TimePicker/TimePickerToolbar.d.ts +10 -0
  62. package/TimePicker/TimePickerToolbar.js +11 -0
  63. package/dateTimeViewRenderers/dateTimeViewRenderers.d.ts +2 -1
  64. package/dateTimeViewRenderers/dateTimeViewRenderers.js +52 -33
  65. package/index.js +1 -1
  66. package/internals/components/FakeTextField/FakeTextField.d.ts +10 -0
  67. package/internals/components/FakeTextField/FakeTextField.js +27 -0
  68. package/internals/components/FakeTextField/index.d.ts +1 -0
  69. package/internals/components/FakeTextField/index.js +1 -0
  70. package/internals/hooks/useField/useField.js +14 -4
  71. package/internals/hooks/useField/useField.utils.js +1 -1
  72. package/internals/hooks/useField/useFieldState.js +5 -8
  73. package/internals/utils/date-time-utils.d.ts +11 -0
  74. package/internals/utils/date-time-utils.js +32 -2
  75. package/legacy/AdapterDayjs/AdapterDayjs.js +6 -4
  76. package/legacy/AdapterMoment/AdapterMoment.js +2 -5
  77. package/legacy/DateField/DateField.js +11 -1
  78. package/legacy/DatePicker/DatePicker.js +10 -0
  79. package/legacy/DatePicker/DatePickerToolbar.js +10 -0
  80. package/legacy/DateTimeField/DateTimeField.js +11 -1
  81. package/legacy/DateTimePicker/DateTimePicker.js +15 -0
  82. package/legacy/DateTimePicker/DateTimePickerTabs.js +11 -0
  83. package/legacy/DateTimePicker/DateTimePickerToolbar.js +11 -0
  84. package/legacy/DayCalendarSkeleton/DayCalendarSkeleton.js +1 -2
  85. package/legacy/DesktopDatePicker/DesktopDatePicker.js +10 -0
  86. package/legacy/DesktopDateTimePicker/DesktopDateTimePicker.js +24 -8
  87. package/legacy/DesktopTimePicker/DesktopTimePicker.js +19 -10
  88. package/legacy/DigitalClock/DigitalClock.js +11 -1
  89. package/legacy/LocalizationProvider/LocalizationProvider.js +12 -0
  90. package/legacy/MobileDatePicker/MobileDatePicker.js +10 -0
  91. package/legacy/MobileDateTimePicker/MobileDateTimePicker.js +10 -0
  92. package/legacy/MobileTimePicker/MobileTimePicker.js +10 -0
  93. package/legacy/MultiSectionDigitalClock/MultiSectionDigitalClock.js +10 -0
  94. package/legacy/PickersActionBar/PickersActionBar.js +10 -0
  95. package/legacy/PickersCalendarHeader/PickersCalendarHeader.js +11 -0
  96. package/legacy/PickersDay/PickersDay.js +1 -3
  97. package/legacy/PickersLayout/PickersLayout.js +10 -0
  98. package/legacy/PickersShortcuts/PickersShortcuts.js +9 -0
  99. package/legacy/StaticDatePicker/StaticDatePicker.js +10 -0
  100. package/legacy/StaticDateTimePicker/StaticDateTimePicker.js +10 -0
  101. package/legacy/StaticTimePicker/StaticTimePicker.js +10 -0
  102. package/legacy/TimeClock/TimeClock.js +4 -0
  103. package/legacy/TimeField/TimeField.js +11 -1
  104. package/legacy/TimePicker/TimePicker.js +10 -0
  105. package/legacy/TimePicker/TimePickerToolbar.js +11 -0
  106. package/legacy/dateTimeViewRenderers/dateTimeViewRenderers.js +51 -33
  107. package/legacy/index.js +1 -1
  108. package/legacy/internals/components/FakeTextField/FakeTextField.js +23 -0
  109. package/legacy/internals/components/FakeTextField/index.js +1 -0
  110. package/legacy/internals/hooks/useField/useField.js +14 -4
  111. package/legacy/internals/hooks/useField/useField.utils.js +1 -1
  112. package/legacy/internals/hooks/useField/useFieldState.js +5 -8
  113. package/legacy/internals/utils/date-time-utils.js +34 -2
  114. package/legacy/locales/esES.js +1 -1
  115. package/locales/esES.js +1 -1
  116. package/modern/AdapterDayjs/AdapterDayjs.js +6 -4
  117. package/modern/AdapterMoment/AdapterMoment.js +2 -5
  118. package/modern/DateField/DateField.js +11 -1
  119. package/modern/DatePicker/DatePicker.js +10 -0
  120. package/modern/DatePicker/DatePickerToolbar.js +10 -0
  121. package/modern/DateTimeField/DateTimeField.js +11 -1
  122. package/modern/DateTimePicker/DateTimePicker.js +15 -0
  123. package/modern/DateTimePicker/DateTimePickerTabs.js +11 -0
  124. package/modern/DateTimePicker/DateTimePickerToolbar.js +11 -0
  125. package/modern/DayCalendarSkeleton/DayCalendarSkeleton.js +1 -2
  126. package/modern/DesktopDatePicker/DesktopDatePicker.js +10 -0
  127. package/modern/DesktopDateTimePicker/DesktopDateTimePicker.js +25 -7
  128. package/modern/DesktopTimePicker/DesktopTimePicker.js +17 -8
  129. package/modern/DigitalClock/DigitalClock.js +11 -1
  130. package/modern/LocalizationProvider/LocalizationProvider.js +12 -0
  131. package/modern/MobileDatePicker/MobileDatePicker.js +10 -0
  132. package/modern/MobileDateTimePicker/MobileDateTimePicker.js +10 -0
  133. package/modern/MobileTimePicker/MobileTimePicker.js +10 -0
  134. package/modern/MultiSectionDigitalClock/MultiSectionDigitalClock.js +10 -0
  135. package/modern/PickersActionBar/PickersActionBar.js +10 -0
  136. package/modern/PickersCalendarHeader/PickersCalendarHeader.js +11 -0
  137. package/modern/PickersDay/PickersDay.js +1 -3
  138. package/modern/PickersLayout/PickersLayout.js +10 -0
  139. package/modern/PickersShortcuts/PickersShortcuts.js +9 -0
  140. package/modern/StaticDatePicker/StaticDatePicker.js +10 -0
  141. package/modern/StaticDateTimePicker/StaticDateTimePicker.js +10 -0
  142. package/modern/StaticTimePicker/StaticTimePicker.js +10 -0
  143. package/modern/TimeClock/TimeClock.js +4 -0
  144. package/modern/TimeField/TimeField.js +11 -1
  145. package/modern/TimePicker/TimePicker.js +10 -0
  146. package/modern/TimePicker/TimePickerToolbar.js +11 -0
  147. package/modern/dateTimeViewRenderers/dateTimeViewRenderers.js +52 -33
  148. package/modern/index.js +1 -1
  149. package/modern/internals/components/FakeTextField/FakeTextField.js +27 -0
  150. package/modern/internals/components/FakeTextField/index.js +1 -0
  151. package/modern/internals/hooks/useField/useField.js +14 -4
  152. package/modern/internals/hooks/useField/useField.utils.js +1 -1
  153. package/modern/internals/hooks/useField/useFieldState.js +5 -8
  154. package/modern/internals/utils/date-time-utils.js +29 -2
  155. package/modern/locales/esES.js +1 -1
  156. package/node/AdapterDayjs/AdapterDayjs.js +6 -4
  157. package/node/AdapterMoment/AdapterMoment.js +2 -5
  158. package/node/DateCalendar/DateCalendar.js +2 -2
  159. package/node/DateCalendar/DayCalendar.js +2 -2
  160. package/node/DateCalendar/PickersFadeTransitionGroup.js +2 -2
  161. package/node/DateCalendar/PickersSlideTransition.js +2 -2
  162. package/node/DateCalendar/useCalendarState.js +2 -2
  163. package/node/DateCalendar/useIsDateDisabled.js +2 -2
  164. package/node/DateField/DateField.js +13 -3
  165. package/node/DatePicker/DatePicker.js +12 -2
  166. package/node/DatePicker/DatePickerToolbar.js +12 -2
  167. package/node/DatePicker/shared.js +2 -2
  168. package/node/DateTimeField/DateTimeField.js +13 -3
  169. package/node/DateTimePicker/DateTimePicker.js +17 -2
  170. package/node/DateTimePicker/DateTimePickerTabs.js +13 -2
  171. package/node/DateTimePicker/DateTimePickerToolbar.js +13 -2
  172. package/node/DateTimePicker/shared.js +2 -2
  173. package/node/DayCalendarSkeleton/DayCalendarSkeleton.js +3 -4
  174. package/node/DesktopDatePicker/DesktopDatePicker.js +12 -2
  175. package/node/DesktopDateTimePicker/DesktopDateTimePicker.js +26 -8
  176. package/node/DesktopTimePicker/DesktopTimePicker.js +19 -10
  177. package/node/DigitalClock/DigitalClock.js +13 -3
  178. package/node/LocalizationProvider/LocalizationProvider.js +14 -2
  179. package/node/MobileDatePicker/MobileDatePicker.js +12 -2
  180. package/node/MobileDateTimePicker/MobileDateTimePicker.js +12 -2
  181. package/node/MobileTimePicker/MobileTimePicker.js +12 -2
  182. package/node/MonthCalendar/MonthCalendar.js +2 -2
  183. package/node/MonthCalendar/PickersMonth.js +2 -2
  184. package/node/MultiSectionDigitalClock/MultiSectionDigitalClock.js +12 -2
  185. package/node/MultiSectionDigitalClock/MultiSectionDigitalClockSection.js +2 -2
  186. package/node/PickersActionBar/PickersActionBar.js +12 -2
  187. package/node/PickersCalendarHeader/PickersCalendarHeader.js +13 -2
  188. package/node/PickersDay/PickersDay.js +3 -5
  189. package/node/PickersLayout/PickersLayout.js +12 -2
  190. package/node/PickersLayout/usePickerLayout.js +2 -2
  191. package/node/PickersShortcuts/PickersShortcuts.js +11 -2
  192. package/node/StaticDatePicker/StaticDatePicker.js +12 -2
  193. package/node/StaticDateTimePicker/StaticDateTimePicker.js +12 -2
  194. package/node/StaticTimePicker/StaticTimePicker.js +12 -2
  195. package/node/TimeClock/Clock.js +2 -2
  196. package/node/TimeClock/ClockNumber.js +2 -2
  197. package/node/TimeClock/ClockNumbers.js +2 -2
  198. package/node/TimeClock/ClockPointer.js +2 -2
  199. package/node/TimeClock/TimeClock.js +6 -2
  200. package/node/TimeField/TimeField.js +13 -3
  201. package/node/TimePicker/TimePicker.js +12 -2
  202. package/node/TimePicker/TimePickerToolbar.js +13 -2
  203. package/node/TimePicker/shared.js +2 -2
  204. package/node/YearCalendar/PickersYear.js +2 -2
  205. package/node/YearCalendar/YearCalendar.js +2 -2
  206. package/node/dateTimeViewRenderers/dateTimeViewRenderers.js +53 -34
  207. package/node/dateViewRenderers/dateViewRenderers.js +2 -2
  208. package/node/hooks/useClearableField.js +2 -2
  209. package/node/icons/index.js +2 -2
  210. package/node/index.js +1 -1
  211. package/node/internals/components/FakeTextField/FakeTextField.js +35 -0
  212. package/node/internals/components/FakeTextField/index.js +12 -0
  213. package/node/internals/components/PickersArrowSwitcher/PickersArrowSwitcher.js +2 -2
  214. package/node/internals/components/PickersModalDialog.js +2 -2
  215. package/node/internals/components/PickersPopper.js +2 -2
  216. package/node/internals/components/PickersToolbar.js +2 -2
  217. package/node/internals/components/PickersToolbarButton.js +2 -2
  218. package/node/internals/components/PickersToolbarText.js +2 -2
  219. package/node/internals/demo/DemoContainer.js +2 -2
  220. package/node/internals/hooks/date-helpers-hooks.js +2 -2
  221. package/node/internals/hooks/useClockReferenceDate.js +2 -2
  222. package/node/internals/hooks/useDesktopPicker/useDesktopPicker.js +2 -2
  223. package/node/internals/hooks/useField/useField.js +16 -6
  224. package/node/internals/hooks/useField/useField.utils.js +1 -1
  225. package/node/internals/hooks/useField/useFieldCharacterEditing.js +2 -2
  226. package/node/internals/hooks/useField/useFieldState.js +7 -10
  227. package/node/internals/hooks/useIsLandscape.js +2 -2
  228. package/node/internals/hooks/useMobilePicker/useMobilePicker.js +2 -2
  229. package/node/internals/hooks/useOpenState.js +2 -2
  230. package/node/internals/hooks/usePicker/usePickerValue.js +2 -2
  231. package/node/internals/hooks/usePicker/usePickerViews.js +2 -2
  232. package/node/internals/hooks/useStaticPicker/useStaticPicker.js +2 -2
  233. package/node/internals/hooks/useUtils.js +2 -2
  234. package/node/internals/hooks/useValidation.js +2 -2
  235. package/node/internals/hooks/useValueWithTimezone.js +2 -2
  236. package/node/internals/hooks/useViews.js +2 -2
  237. package/node/internals/utils/date-time-utils.js +29 -1
  238. package/node/locales/esES.js +1 -1
  239. package/node/timeViewRenderers/timeViewRenderers.js +2 -2
  240. package/package.json +4 -4
@@ -10,6 +10,16 @@ import { DesktopTimePicker } from '../DesktopTimePicker';
10
10
  import { MobileTimePicker } from '../MobileTimePicker';
11
11
  import { DEFAULT_DESKTOP_MODE_MEDIA_QUERY } from '../internals/utils/utils';
12
12
  import { jsx as _jsx } from "react/jsx-runtime";
13
+ /**
14
+ * Demos:
15
+ *
16
+ * - [TimePicker](https://mui.com/x/react-date-pickers/time-picker/)
17
+ * - [Validation](https://mui.com/x/react-date-pickers/validation/)
18
+ *
19
+ * API:
20
+ *
21
+ * - [TimePicker API](https://mui.com/x/api/date-pickers/time-picker/)
22
+ */
13
23
  const TimePicker = /*#__PURE__*/React.forwardRef(function TimePicker(inProps, ref) {
14
24
  const props = useThemeProps({
15
25
  props: inProps,
@@ -11,6 +11,16 @@ export interface ExportedTimePickerToolbarProps extends ExportedBaseToolbarProps
11
11
  ampm?: boolean;
12
12
  ampmInClock?: boolean;
13
13
  }
14
+ /**
15
+ * Demos:
16
+ *
17
+ * - [TimePicker](https://mui.com/x/react-date-pickers/time-picker/)
18
+ * - [Custom components](https://mui.com/x/react-date-pickers/custom-components/)
19
+ *
20
+ * API:
21
+ *
22
+ * - [TimePickerToolbar API](https://mui.com/x/api/date-pickers/time-picker-toolbar/)
23
+ */
14
24
  declare function TimePickerToolbar<TDate extends unknown>(inProps: TimePickerToolbarProps<TDate>): React.JSX.Element;
15
25
  declare namespace TimePickerToolbar {
16
26
  var propTypes: any;
@@ -106,6 +106,17 @@ TimePickerToolbarAmPmSelection.propTypes = {
106
106
  ownerState: PropTypes.object.isRequired,
107
107
  sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object])
108
108
  };
109
+
110
+ /**
111
+ * Demos:
112
+ *
113
+ * - [TimePicker](https://mui.com/x/react-date-pickers/time-picker/)
114
+ * - [Custom components](https://mui.com/x/react-date-pickers/custom-components/)
115
+ *
116
+ * API:
117
+ *
118
+ * - [TimePickerToolbar API](https://mui.com/x/api/date-pickers/time-picker-toolbar/)
119
+ */
109
120
  function TimePickerToolbar(inProps) {
110
121
  const props = useThemeProps({
111
122
  props: inProps,
@@ -9,5 +9,6 @@ export interface DateTimeViewRendererProps<TDate> extends Omit<DateCalendarProps
9
9
  views: readonly DateOrTimeViewWithMeridiem[];
10
10
  focusedView: DateOrTimeViewWithMeridiem | null;
11
11
  timeViewsCount: number;
12
+ shouldRenderTimeInASingleColumn: boolean;
12
13
  }
13
- export declare const renderDesktopDateTimeView: <TDate extends unknown>({ view, onViewChange, views, focusedView, onFocusedViewChange, value, defaultValue, referenceDate, onChange, className, classes, disableFuture, disablePast, minDate, minTime, maxDate, maxTime, shouldDisableDate, shouldDisableMonth, shouldDisableYear, shouldDisableTime, shouldDisableClock, reduceAnimations, minutesStep, ampm, onMonthChange, monthsPerRow, onYearChange, yearsPerRow, defaultCalendarMonth, components, componentsProps, slots, slotProps, loading, renderLoading, disableHighlightToday, readOnly, disabled, showDaysOutsideCurrentMonth, dayOfWeekFormatter, sx, autoFocus, fixedWeekNumber, displayWeekNumber, timezone, disableIgnoringDatePartForTimeValidation, timeSteps, skipDisabled, timeViewsCount, }: DateTimeViewRendererProps<TDate>) => React.JSX.Element;
14
+ export declare const renderDesktopDateTimeView: <TDate extends unknown>({ view, onViewChange, views, focusedView, onFocusedViewChange, value, defaultValue, referenceDate, onChange, className, classes, disableFuture, disablePast, minDate, minTime, maxDate, maxTime, shouldDisableDate, shouldDisableMonth, shouldDisableYear, shouldDisableTime, shouldDisableClock, reduceAnimations, minutesStep, ampm, onMonthChange, monthsPerRow, onYearChange, yearsPerRow, defaultCalendarMonth, components, componentsProps, slots, slotProps, loading, renderLoading, disableHighlightToday, readOnly, disabled, showDaysOutsideCurrentMonth, dayOfWeekFormatter, sx, autoFocus, fixedWeekNumber, displayWeekNumber, timezone, disableIgnoringDatePartForTimeValidation, timeSteps, skipDisabled, timeViewsCount, shouldRenderTimeInASingleColumn, }: DateTimeViewRendererProps<TDate>) => React.JSX.Element;
@@ -3,10 +3,13 @@ import * as React from 'react';
3
3
  import Divider from '@mui/material/Divider';
4
4
  import { resolveComponentProps } from '@mui/base/utils';
5
5
  import { DateCalendar } from '../DateCalendar';
6
- import { MultiSectionDigitalClock, multiSectionDigitalClockSectionClasses } from '../MultiSectionDigitalClock';
6
+ import { multiSectionDigitalClockSectionClasses } from '../MultiSectionDigitalClock';
7
7
  import { DateTimeViewWrapper } from '../internals/components/DateTimeViewWrapper';
8
8
  import { isInternalTimeView } from '../internals/utils/time-utils';
9
9
  import { isDatePickerView } from '../internals/utils/date-utils';
10
+ import { renderDigitalClockTimeView, renderMultiSectionDigitalClockTimeView } from '../timeViewRenderers';
11
+ import { digitalClockClasses } from '../DigitalClock';
12
+ import { VIEW_HEIGHT } from '../internals/constants/dimensions';
10
13
  import { jsx as _jsx } from "react/jsx-runtime";
11
14
  import { jsxs as _jsxs } from "react/jsx-runtime";
12
15
  export const renderDesktopDateTimeView = ({
@@ -59,10 +62,43 @@ export const renderDesktopDateTimeView = ({
59
62
  disableIgnoringDatePartForTimeValidation,
60
63
  timeSteps,
61
64
  skipDisabled,
62
- timeViewsCount
65
+ timeViewsCount,
66
+ shouldRenderTimeInASingleColumn
63
67
  }) => {
64
68
  var _resolveComponentProp, _slotProps$actionBar;
65
69
  const isActionBarVisible = !!((_resolveComponentProp = resolveComponentProps((_slotProps$actionBar = slotProps == null ? void 0 : slotProps.actionBar) != null ? _slotProps$actionBar : componentsProps == null ? void 0 : componentsProps.actionBar, {})) != null && (_resolveComponentProp = _resolveComponentProp.actions) != null && _resolveComponentProp.length);
70
+ const commonTimeProps = {
71
+ view: isInternalTimeView(view) ? view : 'hours',
72
+ onViewChange,
73
+ focusedView: focusedView && isInternalTimeView(focusedView) ? focusedView : null,
74
+ onFocusedViewChange,
75
+ views: views.filter(isInternalTimeView),
76
+ value,
77
+ defaultValue,
78
+ referenceDate,
79
+ onChange,
80
+ className,
81
+ classes,
82
+ disableFuture,
83
+ disablePast,
84
+ minTime,
85
+ maxTime,
86
+ shouldDisableTime,
87
+ shouldDisableClock,
88
+ minutesStep,
89
+ ampm,
90
+ components,
91
+ componentsProps,
92
+ slots,
93
+ slotProps,
94
+ readOnly,
95
+ disabled,
96
+ autoFocus,
97
+ disableIgnoringDatePartForTimeValidation,
98
+ timeSteps,
99
+ skipDisabled,
100
+ timezone
101
+ };
66
102
  return /*#__PURE__*/_jsxs(React.Fragment, {
67
103
  children: [/*#__PURE__*/_jsxs(DateTimeViewWrapper, {
68
104
  children: [/*#__PURE__*/_jsx(DateCalendar, {
@@ -109,45 +145,28 @@ export const renderDesktopDateTimeView = ({
109
145
  }), timeViewsCount > 0 && /*#__PURE__*/_jsxs(React.Fragment, {
110
146
  children: [/*#__PURE__*/_jsx(Divider, {
111
147
  orientation: "vertical"
112
- }), /*#__PURE__*/_jsx(MultiSectionDigitalClock, {
148
+ }), shouldRenderTimeInASingleColumn ? renderDigitalClockTimeView(_extends({}, commonTimeProps, {
149
+ view: 'hours',
150
+ views: ['hours'],
151
+ focusedView: focusedView && isInternalTimeView(focusedView) ? 'hours' : null,
152
+ sx: _extends({
153
+ width: 'auto',
154
+ [`&.${digitalClockClasses.root}`]: {
155
+ maxHeight: VIEW_HEIGHT
156
+ }
157
+ }, Array.isArray(sx) ? sx : [sx])
158
+ })) : renderMultiSectionDigitalClockTimeView(_extends({}, commonTimeProps, {
113
159
  view: isInternalTimeView(view) ? view : 'hours',
114
- onViewChange: onViewChange,
115
- focusedView: focusedView && isInternalTimeView(focusedView) ? focusedView : null,
116
- onFocusedViewChange: onFocusedViewChange,
117
160
  views: views.filter(isInternalTimeView),
118
- value: value,
119
- defaultValue: defaultValue,
120
- referenceDate: referenceDate,
121
- onChange: onChange,
122
- className: className,
123
- classes: classes,
124
- disableFuture: disableFuture,
125
- disablePast: disablePast,
126
- minTime: minTime,
127
- maxTime: maxTime,
128
- shouldDisableTime: shouldDisableTime,
129
- shouldDisableClock: shouldDisableClock,
130
- minutesStep: minutesStep,
131
- ampm: ampm,
132
- components: components,
133
- componentsProps: componentsProps,
134
- slots: slots,
135
- slotProps: slotProps,
136
- readOnly: readOnly,
137
- disabled: disabled,
161
+ focusedView: focusedView && isInternalTimeView(focusedView) ? focusedView : null,
138
162
  sx: _extends({
139
163
  borderBottom: 0,
140
164
  width: 'auto',
141
165
  [`.${multiSectionDigitalClockSectionClasses.root}`]: {
142
166
  maxHeight: '100%'
143
167
  }
144
- }, Array.isArray(sx) ? sx : [sx]),
145
- autoFocus: autoFocus,
146
- disableIgnoringDatePartForTimeValidation: disableIgnoringDatePartForTimeValidation,
147
- timeSteps: timeSteps,
148
- skipDisabled: skipDisabled,
149
- timezone: timezone
150
- })]
168
+ }, Array.isArray(sx) ? sx : [sx])
169
+ }))]
151
170
  })]
152
171
  }), isActionBarVisible && /*#__PURE__*/_jsx(Divider, {})]
153
172
  });
package/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @mui/x-date-pickers v6.16.1
2
+ * @mui/x-date-pickers v6.16.3
3
3
  *
4
4
  * @license MIT
5
5
  * This source code is licensed under the MIT license found in the
@@ -0,0 +1,10 @@
1
+ import * as React from 'react';
2
+ export interface FakeTextFieldElement extends React.HTMLAttributes<HTMLDivElement> {
3
+ before: string;
4
+ after: string;
5
+ }
6
+ interface FakeTextFieldProps {
7
+ elements: FakeTextFieldElement[];
8
+ }
9
+ export declare const FakeTextField: React.ForwardRefExoticComponent<FakeTextFieldProps & React.RefAttributes<HTMLDivElement>>;
10
+ export {};
@@ -0,0 +1,27 @@
1
+ import _extends from "@babel/runtime/helpers/esm/extends";
2
+ import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
3
+ const _excluded = ["before", "after"];
4
+ import * as React from 'react';
5
+ import Stack from '@mui/material/Stack';
6
+ import { jsx as _jsx } from "react/jsx-runtime";
7
+ import { jsxs as _jsxs } from "react/jsx-runtime";
8
+ export const FakeTextField = /*#__PURE__*/React.forwardRef(function FakeTextField(props, ref) {
9
+ const {
10
+ elements
11
+ } = props;
12
+ return /*#__PURE__*/_jsx(Stack, {
13
+ direction: "row",
14
+ spacing: 1,
15
+ ref: ref,
16
+ children: elements.map((_ref, elementIndex) => {
17
+ let {
18
+ before,
19
+ after
20
+ } = _ref,
21
+ otherElementProps = _objectWithoutPropertiesLoose(_ref, _excluded);
22
+ return /*#__PURE__*/_jsxs(React.Fragment, {
23
+ children: [before, /*#__PURE__*/_jsx("input", _extends({}, otherElementProps)), after]
24
+ }, elementIndex);
25
+ })
26
+ });
27
+ });
@@ -0,0 +1 @@
1
+ export { FakeTextField } from './FakeTextField';
@@ -0,0 +1 @@
1
+ export { FakeTextField } from './FakeTextField';
@@ -162,6 +162,11 @@ export const useField = params => {
162
162
  return;
163
163
  }
164
164
  const targetValue = event.target.value;
165
+ if (targetValue === '') {
166
+ resetCharacterQuery();
167
+ clearValue();
168
+ return;
169
+ }
165
170
  const eventData = event.nativeEvent.data;
166
171
  // Calling `.fill(04/11/2022)` in playwright will trigger a change event with the requested content to insert in `event.nativeEvent.data`
167
172
  // usual changes have only the currently typed character in the `event.nativeEvent.data`
@@ -201,8 +206,13 @@ export const useField = params => {
201
206
  const activeSectionEndRelativeToNewValue = cleanValueStr.length - prevValueStr.length + activeSection.end - cleanString(activeSection.endSeparator || '').length;
202
207
  keyPressed = cleanValueStr.slice(activeSection.start + cleanString(activeSection.startSeparator || '').length, activeSectionEndRelativeToNewValue);
203
208
  }
204
- if (isAndroid() && keyPressed.length === 0) {
205
- setTempAndroidValueStr(valueStr);
209
+ if (keyPressed.length === 0) {
210
+ if (isAndroid()) {
211
+ setTempAndroidValueStr(valueStr);
212
+ } else {
213
+ resetCharacterQuery();
214
+ clearActiveSection();
215
+ }
206
216
  return;
207
217
  }
208
218
  applyCharacterEditing({
@@ -260,7 +270,7 @@ export const useField = params => {
260
270
  }
261
271
 
262
272
  // Reset the value of the selected section
263
- case ['Backspace', 'Delete'].includes(event.key):
273
+ case event.key === 'Delete':
264
274
  {
265
275
  event.preventDefault();
266
276
  if (readOnly) {
@@ -321,7 +331,7 @@ export const useField = params => {
321
331
  // Fix scroll jumping on iOS browser: https://github.com/mui/mui-x/issues/8321
322
332
  const currentScrollTop = inputRef.current.scrollTop;
323
333
  // On multi input range pickers we want to update selection range only for the active input
324
- // This helps avoiding the focus jumping on Safari https://github.com/mui/mui-x/issues/9003
334
+ // This helps to avoid the focus jumping on Safari https://github.com/mui/mui-x/issues/9003
325
335
  // because WebKit implements the `setSelectionRange` based on the spec: https://bugs.webkit.org/show_bug.cgi?id=224425
326
336
  if (inputRef.current === getActiveElement(document)) {
327
337
  inputRef.current.setSelectionRange(selectionStart, selectionEnd);
@@ -300,7 +300,7 @@ export const doesSectionFormatHaveLeadingZeros = (utils, timezone, contentType,
300
300
  }
301
301
  case 'seconds':
302
302
  {
303
- return utils.formatByString(utils.setMinutes(now, 1), format).length > 1;
303
+ return utils.formatByString(utils.setSeconds(now, 1), format).length > 1;
304
304
  }
305
305
  default:
306
306
  {
@@ -117,6 +117,9 @@ export const useFieldState = params => {
117
117
  referenceValue,
118
118
  tempValueStrAndroid: null
119
119
  }));
120
+ if (valueManager.areValuesEqual(utils, state.value, value)) {
121
+ return;
122
+ }
120
123
  const context = {
121
124
  validationError: validator({
122
125
  adapter,
@@ -138,9 +141,6 @@ export const useFieldState = params => {
138
141
  return addPositionPropertiesToSections(newSections, isRTL);
139
142
  };
140
143
  const clearValue = () => {
141
- if (valueManager.areValuesEqual(utils, state.value, valueManager.emptyValue)) {
142
- return;
143
- }
144
144
  publishValue({
145
145
  value: valueManager.emptyValue,
146
146
  referenceValue: state.referenceValue,
@@ -152,14 +152,11 @@ export const useFieldState = params => {
152
152
  return;
153
153
  }
154
154
  const activeSection = state.sections[selectedSectionIndexes.startIndex];
155
- if (activeSection.value === '') {
156
- return;
157
- }
158
155
  const activeDateManager = fieldValueManager.getActiveDateManager(utils, state, activeSection);
159
156
  const nonEmptySectionCountBefore = activeDateManager.getSections(state.sections).filter(section => section.value !== '').length;
160
- const isTheOnlyNonEmptySection = nonEmptySectionCountBefore === 1;
157
+ const hasNoOtherNonEmptySections = nonEmptySectionCountBefore === (activeSection.value === '' ? 0 : 1);
161
158
  const newSections = setSectionValue(selectedSectionIndexes.startIndex, '');
162
- const newActiveDate = isTheOnlyNonEmptySection ? null : utils.date(new Date(''));
159
+ const newActiveDate = hasNoOtherNonEmptySections ? null : utils.date(new Date(''));
163
160
  const newValues = activeDateManager.getNewValuesFromNewActiveDate(newActiveDate);
164
161
  if ((newActiveDate != null && !utils.isValid(newActiveDate)) !== (activeDateManager.date != null && !utils.isValid(activeDateManager.date))) {
165
162
  publishValue(_extends({}, newValues, {
@@ -1,6 +1,17 @@
1
1
  import { DateOrTimeView, MuiPickersAdapter } from '../../models';
2
+ import { DateOrTimeViewWithMeridiem } from '../models';
3
+ import { DesktopOnlyTimePickerProps } from '../models/props/clock';
4
+ import { DefaultizedProps } from '../models/helpers';
2
5
  export declare const resolveDateTimeFormat: (utils: MuiPickersAdapter<any>, { views, format, ...other }: {
3
6
  format?: string | undefined;
4
7
  views: readonly DateOrTimeView[];
5
8
  ampm: boolean;
6
9
  }) => string;
10
+ interface DefaultizedTimeViewsProps<TDate, TView = DateOrTimeView> extends DefaultizedProps<DesktopOnlyTimePickerProps<TDate>, 'ampm'> {
11
+ views: readonly TView[];
12
+ }
13
+ interface DefaultizedTimeViewsResponse<TDate, TView = DateOrTimeViewWithMeridiem> extends Required<Pick<DefaultizedTimeViewsProps<TDate, TView>, 'thresholdToRenderTimeInASingleColumn' | 'timeSteps' | 'views'>> {
14
+ shouldRenderTimeInASingleColumn: boolean;
15
+ }
16
+ export declare function resolveTimeViewsResponse<TDate, InTView extends DateOrTimeView = DateOrTimeView, OutTView extends DateOrTimeViewWithMeridiem = DateOrTimeViewWithMeridiem>({ thresholdToRenderTimeInASingleColumn: inThreshold, ampm, timeSteps: inTimeSteps, views, }: DefaultizedTimeViewsProps<TDate, InTView>): DefaultizedTimeViewsResponse<TDate, OutTView>;
17
+ export {};
@@ -1,7 +1,7 @@
1
1
  import _extends from "@babel/runtime/helpers/esm/extends";
2
2
  import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
3
3
  const _excluded = ["views", "format"];
4
- import { resolveTimeFormat, isTimeView } from './time-utils';
4
+ import { resolveTimeFormat, isTimeView, isInternalTimeView } from './time-utils';
5
5
  import { resolveDateFormat } from './date-utils';
6
6
  export const resolveDateTimeFormat = (utils, _ref) => {
7
7
  let {
@@ -38,4 +38,34 @@ export const resolveDateTimeFormat = (utils, _ref) => {
38
38
  views: dateViews
39
39
  }, other), false);
40
40
  return `${dateFormat} ${timeFormat}`;
41
- };
41
+ };
42
+ const resolveViews = (ampm, views, shouldUseSingleColumn) => {
43
+ if (shouldUseSingleColumn) {
44
+ return views.filter(view => !isInternalTimeView(view) || view === 'hours');
45
+ }
46
+ return ampm ? [...views, 'meridiem'] : views;
47
+ };
48
+ const resolveShouldRenderTimeInASingleColumn = (timeSteps, threshold) => {
49
+ var _timeSteps$hours, _timeSteps$minutes;
50
+ return 24 * 60 / (((_timeSteps$hours = timeSteps.hours) != null ? _timeSteps$hours : 1) * ((_timeSteps$minutes = timeSteps.minutes) != null ? _timeSteps$minutes : 5)) <= threshold;
51
+ };
52
+ export function resolveTimeViewsResponse({
53
+ thresholdToRenderTimeInASingleColumn: inThreshold,
54
+ ampm,
55
+ timeSteps: inTimeSteps,
56
+ views
57
+ }) {
58
+ const thresholdToRenderTimeInASingleColumn = inThreshold != null ? inThreshold : 24;
59
+ const timeSteps = _extends({
60
+ hours: 1,
61
+ minutes: 5,
62
+ seconds: 5
63
+ }, inTimeSteps);
64
+ const shouldRenderTimeInASingleColumn = resolveShouldRenderTimeInASingleColumn(timeSteps, thresholdToRenderTimeInASingleColumn);
65
+ return {
66
+ thresholdToRenderTimeInASingleColumn,
67
+ timeSteps,
68
+ shouldRenderTimeInASingleColumn,
69
+ views: resolveViews(ampm, views, shouldRenderTimeInASingleColumn)
70
+ };
71
+ }
@@ -309,14 +309,16 @@ export var AdapterDayjs = /*#__PURE__*/_createClass(function AdapterDayjs() {
309
309
  return parsedValue.locale(_this.locale);
310
310
  };
311
311
  this.getTimezone = function (value) {
312
- if (_this.hasUTCPlugin() && value.isUTC()) {
313
- return 'UTC';
314
- }
315
312
  if (_this.hasTimezonePlugin()) {
316
313
  var _value$$x;
317
314
  // @ts-ignore
318
315
  var zone = (_value$$x = value.$x) == null ? void 0 : _value$$x.$timezone;
319
- return zone != null ? zone : 'system';
316
+ if (zone) {
317
+ return zone;
318
+ }
319
+ }
320
+ if (_this.hasUTCPlugin() && value.isUTC()) {
321
+ return 'UTC';
320
322
  }
321
323
  return 'system';
322
324
  };
@@ -247,16 +247,13 @@ export var AdapterMoment = /*#__PURE__*/_createClass(function AdapterMoment() {
247
247
  };
248
248
  this.getTimezone = function (value) {
249
249
  var _value$_z, _ref2, _this$moment$defaultZ;
250
- if (value.isUTC()) {
251
- return 'UTC';
252
- }
253
-
254
250
  // @ts-ignore
255
251
  // eslint-disable-next-line no-underscore-dangle
256
252
  var zone = (_value$_z = value._z) == null ? void 0 : _value$_z.name;
253
+ var defaultZone = value.isUTC() ? 'UTC' : 'system';
257
254
 
258
255
  // @ts-ignore
259
- return (_ref2 = zone != null ? zone : (_this$moment$defaultZ = _this.moment.defaultZone) == null ? void 0 : _this$moment$defaultZ.name) != null ? _ref2 : 'system';
256
+ return (_ref2 = zone != null ? zone : (_this$moment$defaultZ = _this.moment.defaultZone) == null ? void 0 : _this$moment$defaultZ.name) != null ? _ref2 : defaultZone;
260
257
  };
261
258
  this.setTimezone = function (value, timezone) {
262
259
  var _this$moment$defaultZ2, _this$moment$defaultZ3;
@@ -12,6 +12,16 @@ import { refType } from '@mui/utils';
12
12
  import { useDateField } from './useDateField';
13
13
  import { useClearableField } from '../hooks';
14
14
  import { jsx as _jsx } from "react/jsx-runtime";
15
+ /**
16
+ * Demos:
17
+ *
18
+ * - [DateField](http://mui.com/x/react-date-pickers/date-field/)
19
+ * - [Fields](https://mui.com/x/react-date-pickers/fields/)
20
+ *
21
+ * API:
22
+ *
23
+ * - [DateField API](https://mui.com/x/api/date-pickers/date-field/)
24
+ */
15
25
  var DateField = /*#__PURE__*/React.forwardRef(function DateField(inProps, ref) {
16
26
  var _ref, _slots$textField, _slotProps$textField;
17
27
  var themeProps = useThemeProps({
@@ -96,7 +106,7 @@ process.env.NODE_ENV !== "production" ? DateField.propTypes = {
96
106
  /**
97
107
  * The color of the component.
98
108
  * It supports both default and custom theme colors, which can be added as shown in the
99
- * [palette customization guide](https://mui.com/material-ui/customization/palette/#adding-new-colors).
109
+ * [palette customization guide](https://mui.com/material-ui/customization/palette/#custom-colors).
100
110
  * @default 'primary'
101
111
  */
102
112
  color: PropTypes.oneOf(['error', 'info', 'primary', 'secondary', 'success', 'warning']),
@@ -10,6 +10,16 @@ import { DesktopDatePicker } from '../DesktopDatePicker';
10
10
  import { MobileDatePicker } from '../MobileDatePicker';
11
11
  import { DEFAULT_DESKTOP_MODE_MEDIA_QUERY } from '../internals/utils/utils';
12
12
  import { jsx as _jsx } from "react/jsx-runtime";
13
+ /**
14
+ * Demos:
15
+ *
16
+ * - [DatePicker](https://mui.com/x/react-date-pickers/date-picker/)
17
+ * - [Validation](https://mui.com/x/react-date-pickers/validation/)
18
+ *
19
+ * API:
20
+ *
21
+ * - [DatePicker API](https://mui.com/x/api/date-pickers/date-picker/)
22
+ */
13
23
  var DatePicker = /*#__PURE__*/React.forwardRef(function DatePicker(inProps, ref) {
14
24
  var props = useThemeProps({
15
25
  props: inProps,
@@ -42,6 +42,16 @@ var DatePickerToolbarTitle = styled(Typography, {
42
42
  margin: 'auto 16px auto auto'
43
43
  });
44
44
  });
45
+ /**
46
+ * Demos:
47
+ *
48
+ * - [DatePicker](https://mui.com/x/react-date-pickers/date-picker/)
49
+ * - [Custom components](https://mui.com/x/react-date-pickers/custom-components/)
50
+ *
51
+ * API:
52
+ *
53
+ * - [DatePickerToolbar API](https://mui.com/x/api/date-pickers/date-picker-toolbar/)
54
+ */
45
55
  var DatePickerToolbar = /*#__PURE__*/React.forwardRef(function DatePickerToolbar(inProps, ref) {
46
56
  var props = useThemeProps({
47
57
  props: inProps,
@@ -12,6 +12,16 @@ import { refType } from '@mui/utils';
12
12
  import { useDateTimeField } from './useDateTimeField';
13
13
  import { useClearableField } from '../hooks';
14
14
  import { jsx as _jsx } from "react/jsx-runtime";
15
+ /**
16
+ * Demos:
17
+ *
18
+ * - [DateTimeField](http://mui.com/x/react-date-pickers/date-time-field/)
19
+ * - [Fields](https://mui.com/x/react-date-pickers/fields/)
20
+ *
21
+ * API:
22
+ *
23
+ * - [DateTimeField API](https://mui.com/x/api/date-pickers/date-time-field/)
24
+ */
15
25
  var DateTimeField = /*#__PURE__*/React.forwardRef(function DateTimeField(inProps, ref) {
16
26
  var _ref, _slots$textField, _slotProps$textField;
17
27
  var themeProps = useThemeProps({
@@ -101,7 +111,7 @@ process.env.NODE_ENV !== "production" ? DateTimeField.propTypes = {
101
111
  /**
102
112
  * The color of the component.
103
113
  * It supports both default and custom theme colors, which can be added as shown in the
104
- * [palette customization guide](https://mui.com/material-ui/customization/palette/#adding-new-colors).
114
+ * [palette customization guide](https://mui.com/material-ui/customization/palette/#custom-colors).
105
115
  * @default 'primary'
106
116
  */
107
117
  color: PropTypes.oneOf(['error', 'info', 'primary', 'secondary', 'success', 'warning']),
@@ -10,6 +10,16 @@ import { DesktopDateTimePicker } from '../DesktopDateTimePicker';
10
10
  import { MobileDateTimePicker } from '../MobileDateTimePicker';
11
11
  import { DEFAULT_DESKTOP_MODE_MEDIA_QUERY } from '../internals/utils/utils';
12
12
  import { jsx as _jsx } from "react/jsx-runtime";
13
+ /**
14
+ * Demos:
15
+ *
16
+ * - [DateTimePicker](https://mui.com/x/react-date-pickers/date-time-picker/)
17
+ * - [Validation](https://mui.com/x/react-date-pickers/validation/)
18
+ *
19
+ * API:
20
+ *
21
+ * - [DateTimePicker API](https://mui.com/x/api/date-pickers/date-time-picker/)
22
+ */
13
23
  var DateTimePicker = /*#__PURE__*/React.forwardRef(function DateTimePicker(inProps, ref) {
14
24
  var props = useThemeProps({
15
25
  props: inProps,
@@ -376,6 +386,11 @@ process.env.NODE_ENV !== "production" ? DateTimePicker.propTypes = {
376
386
  * The system prop that allows defining system overrides as well as additional CSS styles.
377
387
  */
378
388
  sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),
389
+ /**
390
+ * Amount of time options below or at which the single column time renderer is used.
391
+ * @default 24
392
+ */
393
+ thresholdToRenderTimeInASingleColumn: PropTypes.number,
379
394
  /**
380
395
  * The time steps between two time unit options.
381
396
  * For example, if `timeStep.minutes = 8`, then the available minute options will be `[0, 8, 16, 24, 32, 40, 48, 56]`.
@@ -48,6 +48,17 @@ var DateTimePickerTabsRoot = styled(Tabs, {
48
48
  })
49
49
  };
50
50
  });
51
+
52
+ /**
53
+ * Demos:
54
+ *
55
+ * - [DateTimePicker](https://mui.com/x/react-date-pickers/date-time-picker/)
56
+ * - [Custom slots and subcomponents](https://mui.com/x/react-date-pickers/custom-components/)
57
+ *
58
+ * API:
59
+ *
60
+ * - [DateTimePickerTabs API](https://mui.com/x/api/date-pickers/date-time-picker-tabs/)
61
+ */
51
62
  var DateTimePickerTabs = function DateTimePickerTabs(inProps) {
52
63
  var props = useThemeProps({
53
64
  props: inProps,
@@ -161,6 +161,17 @@ var DateTimePickerToolbarAmPmSelection = styled('div', {
161
161
  fontSize: 17
162
162
  }));
163
163
  });
164
+
165
+ /**
166
+ * Demos:
167
+ *
168
+ * - [DateTimePicker](https://mui.com/x/react-date-pickers/date-time-picker/)
169
+ * - [Custom components](https://mui.com/x/react-date-pickers/custom-components/)
170
+ *
171
+ * API:
172
+ *
173
+ * - [DateTimePickerToolbar API](https://mui.com/x/api/date-pickers/date-time-picker-toolbar/)
174
+ */
164
175
  function DateTimePickerToolbar(inProps) {
165
176
  var props = useThemeProps({
166
177
  props: inProps,
@@ -65,10 +65,9 @@ DayCalendarSkeletonDay.propTypes = {
65
65
  var monthMap = [[0, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 0, 0, 0]];
66
66
 
67
67
  /**
68
- *
69
68
  * Demos:
70
69
  *
71
- * - [Date Picker](https://mui.com/x/react-date-pickers/date-picker/)
70
+ * - [DateCalendar](https://mui.com/x/react-date-pickers/date-calendar/)
72
71
  *
73
72
  * API:
74
73
  *
@@ -12,6 +12,16 @@ import { DateField } from '../DateField';
12
12
  import { extractValidationProps } from '../internals/utils/validation/extractValidationProps';
13
13
  import { renderDateViewCalendar } from '../dateViewRenderers';
14
14
  import { resolveDateFormat } from '../internals/utils/date-utils';
15
+ /**
16
+ * Demos:
17
+ *
18
+ * - [DatePicker](https://mui.com/x/react-date-pickers/date-picker/)
19
+ * - [Validation](https://mui.com/x/react-date-pickers/validation/)
20
+ *
21
+ * API:
22
+ *
23
+ * - [DesktopDatePicker API](https://mui.com/x/api/date-pickers/desktop-date-picker/)
24
+ */
15
25
  var DesktopDatePicker = /*#__PURE__*/React.forwardRef(function DesktopDatePicker(inProps, ref) {
16
26
  var _defaultizedProps$yea, _defaultizedProps$slo2, _props$localeText$ope, _props$localeText;
17
27
  var localeText = useLocaleText();