@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
@@ -171,6 +171,11 @@ export var useField = function useField(params) {
171
171
  return;
172
172
  }
173
173
  var targetValue = event.target.value;
174
+ if (targetValue === '') {
175
+ resetCharacterQuery();
176
+ clearValue();
177
+ return;
178
+ }
174
179
  var eventData = event.nativeEvent.data;
175
180
  // Calling `.fill(04/11/2022)` in playwright will trigger a change event with the requested content to insert in `event.nativeEvent.data`
176
181
  // usual changes have only the currently typed character in the `event.nativeEvent.data`
@@ -210,8 +215,13 @@ export var useField = function useField(params) {
210
215
  var activeSectionEndRelativeToNewValue = cleanValueStr.length - prevValueStr.length + activeSection.end - cleanString(activeSection.endSeparator || '').length;
211
216
  keyPressed = cleanValueStr.slice(activeSection.start + cleanString(activeSection.startSeparator || '').length, activeSectionEndRelativeToNewValue);
212
217
  }
213
- if (isAndroid() && keyPressed.length === 0) {
214
- setTempAndroidValueStr(valueStr);
218
+ if (keyPressed.length === 0) {
219
+ if (isAndroid()) {
220
+ setTempAndroidValueStr(valueStr);
221
+ } else {
222
+ resetCharacterQuery();
223
+ clearActiveSection();
224
+ }
215
225
  return;
216
226
  }
217
227
  applyCharacterEditing({
@@ -269,7 +279,7 @@ export var useField = function useField(params) {
269
279
  }
270
280
 
271
281
  // Reset the value of the selected section
272
- case ['Backspace', 'Delete'].includes(event.key):
282
+ case event.key === 'Delete':
273
283
  {
274
284
  event.preventDefault();
275
285
  if (readOnly) {
@@ -330,7 +340,7 @@ export var useField = function useField(params) {
330
340
  // Fix scroll jumping on iOS browser: https://github.com/mui/mui-x/issues/8321
331
341
  var currentScrollTop = inputRef.current.scrollTop;
332
342
  // On multi input range pickers we want to update selection range only for the active input
333
- // This helps avoiding the focus jumping on Safari https://github.com/mui/mui-x/issues/9003
343
+ // This helps to avoid the focus jumping on Safari https://github.com/mui/mui-x/issues/9003
334
344
  // because WebKit implements the `setSelectionRange` based on the spec: https://bugs.webkit.org/show_bug.cgi?id=224425
335
345
  if (inputRef.current === getActiveElement(document)) {
336
346
  inputRef.current.setSelectionRange(selectionStart, selectionEnd);
@@ -312,7 +312,7 @@ export var doesSectionFormatHaveLeadingZeros = function doesSectionFormatHaveLea
312
312
  }
313
313
  case 'seconds':
314
314
  {
315
- return utils.formatByString(utils.setMinutes(now, 1), format).length > 1;
315
+ return utils.formatByString(utils.setSeconds(now, 1), format).length > 1;
316
316
  }
317
317
  default:
318
318
  {
@@ -137,6 +137,9 @@ export var useFieldState = function useFieldState(params) {
137
137
  tempValueStrAndroid: null
138
138
  });
139
139
  });
140
+ if (valueManager.areValuesEqual(utils, state.value, value)) {
141
+ return;
142
+ }
140
143
  var context = {
141
144
  validationError: validator({
142
145
  adapter: adapter,
@@ -158,9 +161,6 @@ export var useFieldState = function useFieldState(params) {
158
161
  return addPositionPropertiesToSections(newSections, isRTL);
159
162
  };
160
163
  var clearValue = function clearValue() {
161
- if (valueManager.areValuesEqual(utils, state.value, valueManager.emptyValue)) {
162
- return;
163
- }
164
164
  publishValue({
165
165
  value: valueManager.emptyValue,
166
166
  referenceValue: state.referenceValue,
@@ -172,16 +172,13 @@ export var useFieldState = function useFieldState(params) {
172
172
  return;
173
173
  }
174
174
  var activeSection = state.sections[selectedSectionIndexes.startIndex];
175
- if (activeSection.value === '') {
176
- return;
177
- }
178
175
  var activeDateManager = fieldValueManager.getActiveDateManager(utils, state, activeSection);
179
176
  var nonEmptySectionCountBefore = activeDateManager.getSections(state.sections).filter(function (section) {
180
177
  return section.value !== '';
181
178
  }).length;
182
- var isTheOnlyNonEmptySection = nonEmptySectionCountBefore === 1;
179
+ var hasNoOtherNonEmptySections = nonEmptySectionCountBefore === (activeSection.value === '' ? 0 : 1);
183
180
  var newSections = setSectionValue(selectedSectionIndexes.startIndex, '');
184
- var newActiveDate = isTheOnlyNonEmptySection ? null : utils.date(new Date(''));
181
+ var newActiveDate = hasNoOtherNonEmptySections ? null : utils.date(new Date(''));
185
182
  var newValues = activeDateManager.getNewValuesFromNewActiveDate(newActiveDate);
186
183
  if ((newActiveDate != null && !utils.isValid(newActiveDate)) !== (activeDateManager.date != null && !utils.isValid(activeDateManager.date))) {
187
184
  publishValue(_extends({}, newValues, {
@@ -1,7 +1,8 @@
1
+ import _toConsumableArray from "@babel/runtime/helpers/esm/toConsumableArray";
1
2
  import _extends from "@babel/runtime/helpers/esm/extends";
2
3
  import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
3
4
  var _excluded = ["views", "format"];
4
- import { resolveTimeFormat, isTimeView } from './time-utils';
5
+ import { resolveTimeFormat, isTimeView, isInternalTimeView } from './time-utils';
5
6
  import { resolveDateFormat } from './date-utils';
6
7
  export var resolveDateTimeFormat = function resolveDateTimeFormat(utils, _ref) {
7
8
  var views = _ref.views,
@@ -36,4 +37,35 @@ export var resolveDateTimeFormat = function resolveDateTimeFormat(utils, _ref) {
36
37
  views: dateViews
37
38
  }, other), false);
38
39
  return "".concat(dateFormat, " ").concat(timeFormat);
39
- };
40
+ };
41
+ var resolveViews = function resolveViews(ampm, views, shouldUseSingleColumn) {
42
+ if (shouldUseSingleColumn) {
43
+ return views.filter(function (view) {
44
+ return !isInternalTimeView(view) || view === 'hours';
45
+ });
46
+ }
47
+ return ampm ? [].concat(_toConsumableArray(views), ['meridiem']) : views;
48
+ };
49
+ var resolveShouldRenderTimeInASingleColumn = function resolveShouldRenderTimeInASingleColumn(timeSteps, threshold) {
50
+ var _timeSteps$hours, _timeSteps$minutes;
51
+ return 24 * 60 / (((_timeSteps$hours = timeSteps.hours) != null ? _timeSteps$hours : 1) * ((_timeSteps$minutes = timeSteps.minutes) != null ? _timeSteps$minutes : 5)) <= threshold;
52
+ };
53
+ export function resolveTimeViewsResponse(_ref2) {
54
+ var inThreshold = _ref2.thresholdToRenderTimeInASingleColumn,
55
+ ampm = _ref2.ampm,
56
+ inTimeSteps = _ref2.timeSteps,
57
+ views = _ref2.views;
58
+ var thresholdToRenderTimeInASingleColumn = inThreshold != null ? inThreshold : 24;
59
+ var timeSteps = _extends({
60
+ hours: 1,
61
+ minutes: 5,
62
+ seconds: 5
63
+ }, inTimeSteps);
64
+ var shouldRenderTimeInASingleColumn = resolveShouldRenderTimeInASingleColumn(timeSteps, thresholdToRenderTimeInASingleColumn);
65
+ return {
66
+ thresholdToRenderTimeInASingleColumn: thresholdToRenderTimeInASingleColumn,
67
+ timeSteps: timeSteps,
68
+ shouldRenderTimeInASingleColumn: shouldRenderTimeInASingleColumn,
69
+ views: resolveViews(ampm, views, shouldRenderTimeInASingleColumn)
70
+ };
71
+ }
@@ -68,7 +68,7 @@ var esESPickers = {
68
68
  dateTableLabel: 'elige la hora',
69
69
  // Field section placeholders
70
70
  fieldYearPlaceholder: function fieldYearPlaceholder(params) {
71
- return 'Y'.repeat(params.digitAmount);
71
+ return 'A'.repeat(params.digitAmount);
72
72
  },
73
73
  fieldMonthPlaceholder: function fieldMonthPlaceholder(params) {
74
74
  return params.contentType === 'letter' ? 'MMMM' : 'MM';
package/locales/esES.js CHANGED
@@ -47,7 +47,7 @@ const esESPickers = {
47
47
  timeTableLabel: 'elige la fecha',
48
48
  dateTableLabel: 'elige la hora',
49
49
  // Field section placeholders
50
- fieldYearPlaceholder: params => 'Y'.repeat(params.digitAmount),
50
+ fieldYearPlaceholder: params => 'A'.repeat(params.digitAmount),
51
51
  fieldMonthPlaceholder: params => params.contentType === 'letter' ? 'MMMM' : 'MM',
52
52
  fieldDayPlaceholder: () => 'DD',
53
53
  fieldWeekDayPlaceholder: params => params.contentType === 'letter' ? 'EEEE' : 'EE',
@@ -295,13 +295,15 @@ export class AdapterDayjs {
295
295
  return parsedValue.locale(this.locale);
296
296
  };
297
297
  this.getTimezone = value => {
298
- if (this.hasUTCPlugin() && value.isUTC()) {
299
- return 'UTC';
300
- }
301
298
  if (this.hasTimezonePlugin()) {
302
299
  // @ts-ignore
303
300
  const zone = value.$x?.$timezone;
304
- return zone ?? 'system';
301
+ if (zone) {
302
+ return zone;
303
+ }
304
+ }
305
+ if (this.hasUTCPlugin() && value.isUTC()) {
306
+ return 'UTC';
305
307
  }
306
308
  return 'system';
307
309
  };
@@ -239,16 +239,13 @@ export class AdapterMoment {
239
239
  return this.createTZDate(value, timezone);
240
240
  };
241
241
  this.getTimezone = value => {
242
- if (value.isUTC()) {
243
- return 'UTC';
244
- }
245
-
246
242
  // @ts-ignore
247
243
  // eslint-disable-next-line no-underscore-dangle
248
244
  const zone = value._z?.name;
245
+ const defaultZone = value.isUTC() ? 'UTC' : 'system';
249
246
 
250
247
  // @ts-ignore
251
- return zone ?? this.moment.defaultZone?.name ?? 'system';
248
+ return zone ?? this.moment.defaultZone?.name ?? defaultZone;
252
249
  };
253
250
  this.setTimezone = (value, timezone) => {
254
251
  if (this.getTimezone(value) === timezone) {
@@ -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
  const DateField = /*#__PURE__*/React.forwardRef(function DateField(inProps, ref) {
16
26
  const themeProps = useThemeProps({
17
27
  props: inProps,
@@ -102,7 +112,7 @@ process.env.NODE_ENV !== "production" ? DateField.propTypes = {
102
112
  /**
103
113
  * The color of the component.
104
114
  * It supports both default and custom theme colors, which can be added as shown in the
105
- * [palette customization guide](https://mui.com/material-ui/customization/palette/#adding-new-colors).
115
+ * [palette customization guide](https://mui.com/material-ui/customization/palette/#custom-colors).
106
116
  * @default 'primary'
107
117
  */
108
118
  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
  const DatePicker = /*#__PURE__*/React.forwardRef(function DatePicker(inProps, ref) {
14
24
  const props = useThemeProps({
15
25
  props: inProps,
@@ -39,6 +39,16 @@ const DatePickerToolbarTitle = styled(Typography, {
39
39
  }) => _extends({}, ownerState.isLandscape && {
40
40
  margin: 'auto 16px auto auto'
41
41
  }));
42
+ /**
43
+ * Demos:
44
+ *
45
+ * - [DatePicker](https://mui.com/x/react-date-pickers/date-picker/)
46
+ * - [Custom components](https://mui.com/x/react-date-pickers/custom-components/)
47
+ *
48
+ * API:
49
+ *
50
+ * - [DatePickerToolbar API](https://mui.com/x/api/date-pickers/date-picker-toolbar/)
51
+ */
42
52
  const DatePickerToolbar = /*#__PURE__*/React.forwardRef(function DatePickerToolbar(inProps, ref) {
43
53
  const props = useThemeProps({
44
54
  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
  const DateTimeField = /*#__PURE__*/React.forwardRef(function DateTimeField(inProps, ref) {
16
26
  const themeProps = useThemeProps({
17
27
  props: inProps,
@@ -107,7 +117,7 @@ process.env.NODE_ENV !== "production" ? DateTimeField.propTypes = {
107
117
  /**
108
118
  * The color of the component.
109
119
  * It supports both default and custom theme colors, which can be added as shown in the
110
- * [palette customization guide](https://mui.com/material-ui/customization/palette/#adding-new-colors).
120
+ * [palette customization guide](https://mui.com/material-ui/customization/palette/#custom-colors).
111
121
  * @default 'primary'
112
122
  */
113
123
  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
  const DateTimePicker = /*#__PURE__*/React.forwardRef(function DateTimePicker(inProps, ref) {
14
24
  const props = useThemeProps({
15
25
  props: inProps,
@@ -377,6 +387,11 @@ process.env.NODE_ENV !== "production" ? DateTimePicker.propTypes = {
377
387
  * The system prop that allows defining system overrides as well as additional CSS styles.
378
388
  */
379
389
  sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),
390
+ /**
391
+ * Amount of time options below or at which the single column time renderer is used.
392
+ * @default 24
393
+ */
394
+ thresholdToRenderTimeInASingleColumn: PropTypes.number,
380
395
  /**
381
396
  * The time steps between two time unit options.
382
397
  * For example, if `timeStep.minutes = 8`, then the available minute options will be `[0, 8, 16, 24, 32, 40, 48, 56]`.
@@ -47,6 +47,17 @@ const DateTimePickerTabsRoot = styled(Tabs, {
47
47
  }
48
48
  }
49
49
  }));
50
+
51
+ /**
52
+ * Demos:
53
+ *
54
+ * - [DateTimePicker](https://mui.com/x/react-date-pickers/date-time-picker/)
55
+ * - [Custom slots and subcomponents](https://mui.com/x/react-date-pickers/custom-components/)
56
+ *
57
+ * API:
58
+ *
59
+ * - [DateTimePickerTabs API](https://mui.com/x/api/date-pickers/date-time-picker-tabs/)
60
+ */
50
61
  const DateTimePickerTabs = function DateTimePickerTabs(inProps) {
51
62
  const props = useThemeProps({
52
63
  props: inProps,
@@ -153,6 +153,17 @@ const DateTimePickerToolbarAmPmSelection = styled('div', {
153
153
  fontSize: 17
154
154
  }
155
155
  }));
156
+
157
+ /**
158
+ * Demos:
159
+ *
160
+ * - [DateTimePicker](https://mui.com/x/react-date-pickers/date-time-picker/)
161
+ * - [Custom components](https://mui.com/x/react-date-pickers/custom-components/)
162
+ *
163
+ * API:
164
+ *
165
+ * - [DateTimePickerToolbar API](https://mui.com/x/api/date-pickers/date-time-picker-toolbar/)
166
+ */
156
167
  function DateTimePickerToolbar(inProps) {
157
168
  const props = useThemeProps({
158
169
  props: inProps,
@@ -60,10 +60,9 @@ DayCalendarSkeletonDay.propTypes = {
60
60
  const 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]];
61
61
 
62
62
  /**
63
- *
64
63
  * Demos:
65
64
  *
66
- * - [Date Picker](https://mui.com/x/react-date-pickers/date-picker/)
65
+ * - [DateCalendar](https://mui.com/x/react-date-pickers/date-calendar/)
67
66
  *
68
67
  * API:
69
68
  *
@@ -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
  const DesktopDatePicker = /*#__PURE__*/React.forwardRef(function DesktopDatePicker(inProps, ref) {
16
26
  const localeText = useLocaleText();
17
27
  const utils = useUtils();
@@ -13,18 +13,29 @@ import { validateDateTime } from '../internals/utils/validation/validateDateTime
13
13
  import { CalendarIcon } from '../icons';
14
14
  import { useDesktopPicker } from '../internals/hooks/useDesktopPicker';
15
15
  import { extractValidationProps } from '../internals/utils/validation/extractValidationProps';
16
- import { resolveDateTimeFormat } from '../internals/utils/date-time-utils';
16
+ import { resolveDateTimeFormat, resolveTimeViewsResponse } from '../internals/utils/date-time-utils';
17
+ /**
18
+ * Demos:
19
+ *
20
+ * - [DateTimePicker](https://mui.com/x/react-date-pickers/date-time-picker/)
21
+ * - [Validation](https://mui.com/x/react-date-pickers/validation/)
22
+ *
23
+ * API:
24
+ *
25
+ * - [DesktopDateTimePicker API](https://mui.com/x/api/date-pickers/desktop-date-time-picker/)
26
+ */
17
27
  const DesktopDateTimePicker = /*#__PURE__*/React.forwardRef(function DesktopDateTimePicker(inProps, ref) {
18
28
  const localeText = useLocaleText();
19
29
  const utils = useUtils();
20
30
 
21
31
  // Props with the default values common to all date time pickers
22
32
  const defaultizedProps = useDateTimePickerDefaultizedProps(inProps, 'MuiDesktopDateTimePicker');
23
- const timeSteps = _extends({
24
- hours: 1,
25
- minutes: 5,
26
- seconds: 5
27
- }, defaultizedProps.timeSteps);
33
+ const {
34
+ shouldRenderTimeInASingleColumn,
35
+ thresholdToRenderTimeInASingleColumn,
36
+ views,
37
+ timeSteps
38
+ } = resolveTimeViewsResponse(defaultizedProps);
28
39
  const shouldUseNewRenderer = !defaultizedProps.viewRenderers || Object.keys(defaultizedProps.viewRenderers).length === 0;
29
40
  const viewRenderers =
30
41
  // we can only ensure the expected two-column layout if none of the renderers are overridden
@@ -53,10 +64,12 @@ const DesktopDateTimePicker = /*#__PURE__*/React.forwardRef(function DesktopDate
53
64
  const props = _extends({}, defaultizedProps, {
54
65
  viewRenderers,
55
66
  format: resolveDateTimeFormat(utils, defaultizedProps),
56
- views: defaultizedProps.ampm ? [...defaultizedProps.views, 'meridiem'] : defaultizedProps.views,
67
+ views,
57
68
  yearsPerRow: defaultizedProps.yearsPerRow ?? 4,
58
69
  ampmInClock,
59
70
  timeSteps,
71
+ thresholdToRenderTimeInASingleColumn,
72
+ shouldRenderTimeInASingleColumn,
60
73
  slots: _extends({
61
74
  field: DateTimeField,
62
75
  openPickerIcon: CalendarIcon
@@ -427,6 +440,11 @@ DesktopDateTimePicker.propTypes = {
427
440
  * The system prop that allows defining system overrides as well as additional CSS styles.
428
441
  */
429
442
  sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),
443
+ /**
444
+ * Amount of time options below or at which the single column time renderer is used.
445
+ * @default 24
446
+ */
447
+ thresholdToRenderTimeInASingleColumn: PropTypes.number,
430
448
  /**
431
449
  * The time steps between two time unit options.
432
450
  * For example, if `timeStep.minutes = 8`, then the available minute options will be `[0, 8, 16, 24, 32, 40, 48, 56]`.
@@ -13,19 +13,28 @@ import { useDesktopPicker } from '../internals/hooks/useDesktopPicker';
13
13
  import { extractValidationProps } from '../internals/utils/validation/extractValidationProps';
14
14
  import { renderDigitalClockTimeView, renderMultiSectionDigitalClockTimeView } from '../timeViewRenderers';
15
15
  import { resolveTimeFormat } from '../internals/utils/time-utils';
16
+ import { resolveTimeViewsResponse } from '../internals/utils/date-time-utils';
17
+ /**
18
+ * Demos:
19
+ *
20
+ * - [TimePicker](https://mui.com/x/react-date-pickers/time-picker/)
21
+ * - [Validation](https://mui.com/x/react-date-pickers/validation/)
22
+ *
23
+ * API:
24
+ *
25
+ * - [DesktopTimePicker API](https://mui.com/x/api/date-pickers/desktop-time-picker/)
26
+ */
16
27
  const DesktopTimePicker = /*#__PURE__*/React.forwardRef(function DesktopTimePicker(inProps, ref) {
17
28
  const localeText = useLocaleText();
18
29
  const utils = useUtils();
19
30
 
20
31
  // Props with the default values common to all time pickers
21
32
  const defaultizedProps = useTimePickerDefaultizedProps(inProps, 'MuiDesktopTimePicker');
22
- const thresholdToRenderTimeInASingleColumn = defaultizedProps.thresholdToRenderTimeInASingleColumn ?? 24;
23
- const timeSteps = _extends({
24
- hours: 1,
25
- minutes: 5,
26
- seconds: 5
27
- }, defaultizedProps.timeSteps);
28
- const shouldRenderTimeInASingleColumn = 24 * 60 / (timeSteps.hours * timeSteps.minutes) <= thresholdToRenderTimeInASingleColumn;
33
+ const {
34
+ shouldRenderTimeInASingleColumn,
35
+ views: resolvedViews,
36
+ timeSteps
37
+ } = resolveTimeViewsResponse(defaultizedProps);
29
38
  const renderTimeView = shouldRenderTimeInASingleColumn ? renderDigitalClockTimeView : renderMultiSectionDigitalClockTimeView;
30
39
  const viewRenderers = _extends({
31
40
  hours: renderTimeView,
@@ -37,7 +46,7 @@ const DesktopTimePicker = /*#__PURE__*/React.forwardRef(function DesktopTimePick
37
46
  const actionBarActions = shouldRenderTimeInASingleColumn ? [] : ['accept'];
38
47
  // Need to avoid adding the `meridiem` view when unexpected renderer is specified
39
48
  const shouldHoursRendererContainMeridiemView = viewRenderers.hours?.name === renderMultiSectionDigitalClockTimeView.name;
40
- const views = defaultizedProps.ampm && shouldHoursRendererContainMeridiemView ? [...defaultizedProps.views, 'meridiem'] : defaultizedProps.views;
49
+ const views = !shouldHoursRendererContainMeridiemView ? resolvedViews.filter(view => view !== 'meridiem') : resolvedViews;
41
50
 
42
51
  // Props with the default values specific to the desktop variant
43
52
  const props = _extends({}, defaultizedProps, {
@@ -79,6 +79,16 @@ const DigitalClockItem = styled(MenuItem, {
79
79
  backgroundColor: theme.vars ? `rgba(${theme.vars.palette.primary.mainChannel} / ${theme.vars.palette.action.focusOpacity})` : alpha(theme.palette.primary.main, theme.palette.action.focusOpacity)
80
80
  }
81
81
  }));
82
+ /**
83
+ * Demos:
84
+ *
85
+ * - [TimePicker](https://mui.com/x/react-date-pickers/time-picker/)
86
+ * - [DigitalClock](https://mui.com/x/react-date-pickers/digital-clock/)
87
+ *
88
+ * API:
89
+ *
90
+ * - [DigitalClock API](https://mui.com/x/api/date-pickers/digital-clock/)
91
+ */
82
92
  export const DigitalClock = /*#__PURE__*/React.forwardRef(function DigitalClock(inProps, ref) {
83
93
  const utils = useUtils();
84
94
  const containerRef = React.useRef(null);
@@ -152,7 +162,7 @@ export const DigitalClock = /*#__PURE__*/React.forwardRef(function DigitalClock(
152
162
  props,
153
163
  timezone
154
164
  });
155
- const handleValueChange = useEventCallback(newValue => handleRawValueChange(newValue, 'finish'));
165
+ const handleValueChange = useEventCallback(newValue => handleRawValueChange(newValue, 'finish', 'hours'));
156
166
  const {
157
167
  setValueAndGoToNextView
158
168
  } = useViews({
@@ -9,6 +9,18 @@ export const MuiPickersAdapterContext = /*#__PURE__*/React.createContext(null);
9
9
  if (process.env.NODE_ENV !== 'production') {
10
10
  MuiPickersAdapterContext.displayName = 'MuiPickersAdapterContext';
11
11
  }
12
+ /**
13
+ * Demos:
14
+ *
15
+ * - [Date format and localization](https://mui.com/x/react-date-pickers/adapters-locale/)
16
+ * - [Calendar systems](https://mui.com/x/react-date-pickers/calendar-systems/)
17
+ * - [Translated components](https://mui.com/x/react-date-pickers/localization/)
18
+ * - [UTC and timezones](https://mui.com/x/react-date-pickers/timezone/)
19
+ *
20
+ * API:
21
+ *
22
+ * - [LocalizationProvider API](https://mui.com/x/api/date-pickers/localization-provider/)
23
+ */
12
24
  export const LocalizationProvider = function LocalizationProvider(inProps) {
13
25
  const {
14
26
  localeText: inLocaleText
@@ -11,6 +11,16 @@ import { extractValidationProps } from '../internals/utils/validation/extractVal
11
11
  import { singleItemValueManager } from '../internals/utils/valueManagers';
12
12
  import { renderDateViewCalendar } from '../dateViewRenderers';
13
13
  import { resolveDateFormat } from '../internals/utils/date-utils';
14
+ /**
15
+ * Demos:
16
+ *
17
+ * - [DatePicker](https://mui.com/x/react-date-pickers/date-picker/)
18
+ * - [Validation](https://mui.com/x/react-date-pickers/validation/)
19
+ *
20
+ * API:
21
+ *
22
+ * - [MobileDatePicker API](https://mui.com/x/api/date-pickers/mobile-date-picker/)
23
+ */
14
24
  const MobileDatePicker = /*#__PURE__*/React.forwardRef(function MobileDatePicker(inProps, ref) {
15
25
  const localeText = useLocaleText();
16
26
  const utils = useUtils();
@@ -13,6 +13,16 @@ import { extractValidationProps } from '../internals/utils/validation/extractVal
13
13
  import { renderDateViewCalendar } from '../dateViewRenderers';
14
14
  import { renderTimeViewClock } from '../timeViewRenderers';
15
15
  import { resolveDateTimeFormat } from '../internals/utils/date-time-utils';
16
+ /**
17
+ * Demos:
18
+ *
19
+ * - [DateTimePicker](https://mui.com/x/react-date-pickers/date-time-picker/)
20
+ * - [Validation](https://mui.com/x/react-date-pickers/validation/)
21
+ *
22
+ * API:
23
+ *
24
+ * - [MobileDateTimePicker API](https://mui.com/x/api/date-pickers/mobile-date-time-picker/)
25
+ */
16
26
  const MobileDateTimePicker = /*#__PURE__*/React.forwardRef(function MobileDateTimePicker(inProps, ref) {
17
27
  const localeText = useLocaleText();
18
28
  const utils = useUtils();
@@ -12,6 +12,16 @@ import { useMobilePicker } from '../internals/hooks/useMobilePicker';
12
12
  import { extractValidationProps } from '../internals/utils/validation/extractValidationProps';
13
13
  import { renderTimeViewClock } from '../timeViewRenderers';
14
14
  import { resolveTimeFormat } from '../internals/utils/time-utils';
15
+ /**
16
+ * Demos:
17
+ *
18
+ * - [TimePicker](https://mui.com/x/react-date-pickers/time-picker/)
19
+ * - [Validation](https://mui.com/x/react-date-pickers/validation/)
20
+ *
21
+ * API:
22
+ *
23
+ * - [MobileTimePicker API](https://mui.com/x/api/date-pickers/mobile-time-picker/)
24
+ */
15
25
  const MobileTimePicker = /*#__PURE__*/React.forwardRef(function MobileTimePicker(inProps, ref) {
16
26
  const localeText = useLocaleText();
17
27
  const utils = useUtils();
@@ -41,6 +41,16 @@ const MultiSectionDigitalClockRoot = styled(PickerViewRoot, {
41
41
  width: '100%',
42
42
  borderBottom: `1px solid ${(theme.vars || theme).palette.divider}`
43
43
  }));
44
+ /**
45
+ * Demos:
46
+ *
47
+ * - [TimePicker](https://mui.com/x/react-date-pickers/time-picker/)
48
+ * - [DigitalClock](https://mui.com/x/react-date-pickers/digital-clock/)
49
+ *
50
+ * API:
51
+ *
52
+ * - [MultiSectionDigitalClock API](https://mui.com/x/api/date-pickers/multi-section-digital-clock/)
53
+ */
44
54
  export const MultiSectionDigitalClock = /*#__PURE__*/React.forwardRef(function MultiSectionDigitalClock(inProps, ref) {
45
55
  const utils = useUtils();
46
56
  const props = useThemeProps({
@@ -7,6 +7,16 @@ import Button from '@mui/material/Button';
7
7
  import DialogActions from '@mui/material/DialogActions';
8
8
  import { useLocaleText } from '../internals/hooks/useUtils';
9
9
  import { jsx as _jsx } from "react/jsx-runtime";
10
+ /**
11
+ * Demos:
12
+ *
13
+ * - [Custom slots and subcomponents](https://mui.com/x/react-date-pickers/custom-components/)
14
+ * - [Custom layout](https://mui.com/x/react-date-pickers/custom-layout/)
15
+ *
16
+ * API:
17
+ *
18
+ * - [PickersActionBar API](https://mui.com/x/api/date-pickers/pickers-action-bar/)
19
+ */
10
20
  function PickersActionBar(props) {
11
21
  const {
12
22
  onAccept,