@mui/x-date-pickers 7.0.0-alpha.1 → 7.0.0-alpha.2

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 (227) hide show
  1. package/AdapterDateFns/AdapterDateFns.d.ts +2 -2
  2. package/AdapterDateFns/AdapterDateFns.js +1 -3
  3. package/AdapterDateFnsJalali/AdapterDateFnsJalali.d.ts +2 -2
  4. package/AdapterDateFnsJalali/AdapterDateFnsJalali.js +1 -3
  5. package/AdapterDayjs/AdapterDayjs.d.ts +2 -2
  6. package/AdapterDayjs/AdapterDayjs.js +2 -7
  7. package/AdapterLuxon/AdapterLuxon.d.ts +2 -2
  8. package/AdapterLuxon/AdapterLuxon.js +2 -23
  9. package/AdapterMoment/AdapterMoment.d.ts +2 -2
  10. package/AdapterMoment/AdapterMoment.js +2 -9
  11. package/AdapterMomentHijri/AdapterMomentHijri.d.ts +1 -2
  12. package/AdapterMomentHijri/AdapterMomentHijri.js +0 -3
  13. package/AdapterMomentJalaali/AdapterMomentJalaali.d.ts +1 -2
  14. package/AdapterMomentJalaali/AdapterMomentJalaali.js +0 -3
  15. package/CHANGELOG.md +366 -188
  16. package/DateCalendar/DateCalendar.js +2 -8
  17. package/DateCalendar/DateCalendar.types.d.ts +0 -4
  18. package/DateCalendar/dayCalendarClasses.d.ts +1 -1
  19. package/DateCalendar/dayCalendarClasses.js +1 -1
  20. package/DateCalendar/index.d.ts +1 -1
  21. package/DateCalendar/index.js +1 -1
  22. package/DateCalendar/useCalendarState.d.ts +1 -1
  23. package/DateCalendar/useCalendarState.js +1 -9
  24. package/DateField/DateField.js +1 -1
  25. package/DatePicker/DatePicker.js +1 -5
  26. package/DateTimeField/DateTimeField.js +1 -9
  27. package/DateTimePicker/DateTimePicker.js +1 -13
  28. package/DesktopDatePicker/DesktopDatePicker.js +1 -5
  29. package/DesktopDateTimePicker/DesktopDateTimePicker.js +1 -13
  30. package/DesktopTimePicker/DesktopTimePicker.js +1 -9
  31. package/DigitalClock/DigitalClock.js +3 -15
  32. package/MobileDatePicker/MobileDatePicker.js +1 -5
  33. package/MobileDateTimePicker/MobileDateTimePicker.js +1 -13
  34. package/MobileTimePicker/MobileTimePicker.js +1 -9
  35. package/MonthCalendar/MonthCalendar.js +1 -1
  36. package/MultiSectionDigitalClock/MultiSectionDigitalClock.js +3 -15
  37. package/PickersDay/PickersDay.js +1 -1
  38. package/StaticDatePicker/StaticDatePicker.js +1 -5
  39. package/StaticDateTimePicker/StaticDateTimePicker.js +1 -13
  40. package/StaticTimePicker/StaticTimePicker.js +1 -9
  41. package/TimeClock/Clock.js +1 -1
  42. package/TimeClock/TimeClock.js +3 -15
  43. package/TimeField/TimeField.js +1 -9
  44. package/TimePicker/TimePicker.js +1 -9
  45. package/YearCalendar/YearCalendar.js +1 -1
  46. package/dateTimeViewRenderers/dateTimeViewRenderers.d.ts +1 -1
  47. package/dateTimeViewRenderers/dateTimeViewRenderers.js +0 -4
  48. package/dateViewRenderers/dateViewRenderers.d.ts +1 -1
  49. package/dateViewRenderers/dateViewRenderers.js +0 -2
  50. package/index.js +1 -1
  51. package/internals/hooks/date-helpers-hooks.js +2 -2
  52. package/internals/hooks/useField/useField.utils.js +8 -8
  53. package/internals/hooks/useField/useFieldState.js +1 -1
  54. package/internals/hooks/usePicker/usePickerValue.types.d.ts +1 -1
  55. package/internals/hooks/useUtils.js +1 -1
  56. package/internals/hooks/useViews.js +2 -2
  57. package/internals/models/validation.d.ts +0 -8
  58. package/internals/utils/date-utils.js +2 -2
  59. package/internals/utils/validation/extractValidationProps.d.ts +1 -1
  60. package/internals/utils/validation/extractValidationProps.js +1 -1
  61. package/internals/utils/validation/validateDate.js +1 -1
  62. package/internals/utils/validation/validateTime.js +1 -8
  63. package/legacy/AdapterDateFns/AdapterDateFns.js +2 -2
  64. package/legacy/AdapterDateFnsJalali/AdapterDateFnsJalali.js +2 -2
  65. package/legacy/AdapterDayjs/AdapterDayjs.js +4 -6
  66. package/legacy/AdapterLuxon/AdapterLuxon.js +4 -22
  67. package/legacy/AdapterMoment/AdapterMoment.js +4 -8
  68. package/legacy/AdapterMomentHijri/AdapterMomentHijri.js +0 -3
  69. package/legacy/AdapterMomentJalaali/AdapterMomentJalaali.js +0 -3
  70. package/legacy/DateCalendar/DateCalendar.js +2 -8
  71. package/legacy/DateCalendar/PickersSlideTransition.js +8 -9
  72. package/legacy/DateCalendar/dayCalendarClasses.js +1 -1
  73. package/legacy/DateCalendar/index.js +1 -1
  74. package/legacy/DateCalendar/useCalendarState.js +1 -9
  75. package/legacy/DateField/DateField.js +1 -1
  76. package/legacy/DatePicker/DatePicker.js +1 -5
  77. package/legacy/DateTimeField/DateTimeField.js +1 -9
  78. package/legacy/DateTimePicker/DateTimePicker.js +1 -13
  79. package/legacy/DesktopDatePicker/DesktopDatePicker.js +1 -5
  80. package/legacy/DesktopDateTimePicker/DesktopDateTimePicker.js +1 -13
  81. package/legacy/DesktopTimePicker/DesktopTimePicker.js +1 -9
  82. package/legacy/DigitalClock/DigitalClock.js +3 -15
  83. package/legacy/MobileDatePicker/MobileDatePicker.js +1 -5
  84. package/legacy/MobileDateTimePicker/MobileDateTimePicker.js +1 -13
  85. package/legacy/MobileTimePicker/MobileTimePicker.js +1 -9
  86. package/legacy/MonthCalendar/MonthCalendar.js +1 -1
  87. package/legacy/MonthCalendar/PickersMonth.js +4 -5
  88. package/legacy/MultiSectionDigitalClock/MultiSectionDigitalClock.js +3 -15
  89. package/legacy/PickersDay/PickersDay.js +6 -7
  90. package/legacy/PickersLayout/PickersLayout.js +5 -6
  91. package/legacy/StaticDatePicker/StaticDatePicker.js +1 -5
  92. package/legacy/StaticDateTimePicker/StaticDateTimePicker.js +1 -13
  93. package/legacy/StaticTimePicker/StaticTimePicker.js +1 -9
  94. package/legacy/TimeClock/Clock.js +1 -1
  95. package/legacy/TimeClock/ClockNumber.js +4 -5
  96. package/legacy/TimeClock/TimeClock.js +3 -15
  97. package/legacy/TimeField/TimeField.js +1 -9
  98. package/legacy/TimePicker/TimePicker.js +1 -9
  99. package/legacy/TimePicker/TimePickerToolbar.js +1 -2
  100. package/legacy/YearCalendar/PickersYear.js +4 -5
  101. package/legacy/YearCalendar/YearCalendar.js +1 -1
  102. package/legacy/dateTimeViewRenderers/dateTimeViewRenderers.js +0 -4
  103. package/legacy/dateViewRenderers/dateViewRenderers.js +0 -2
  104. package/legacy/index.js +1 -1
  105. package/legacy/internals/components/PickersModalDialog.js +3 -4
  106. package/legacy/internals/hooks/date-helpers-hooks.js +2 -2
  107. package/legacy/internals/hooks/useField/useField.utils.js +8 -8
  108. package/legacy/internals/hooks/useField/useFieldState.js +1 -1
  109. package/legacy/internals/hooks/useUtils.js +1 -1
  110. package/legacy/internals/hooks/useViews.js +2 -2
  111. package/legacy/internals/utils/date-utils.js +2 -2
  112. package/legacy/internals/utils/validation/extractValidationProps.js +1 -1
  113. package/legacy/internals/utils/validation/validateDate.js +1 -1
  114. package/legacy/internals/utils/validation/validateTime.js +1 -8
  115. package/legacy/locales/deDE.js +4 -3
  116. package/legacy/locales/index.js +1 -0
  117. package/legacy/locales/mk.js +91 -0
  118. package/legacy/timeViewRenderers/timeViewRenderers.js +0 -6
  119. package/locales/deDE.js +2 -3
  120. package/locales/index.d.ts +1 -0
  121. package/locales/index.js +1 -0
  122. package/locales/mk.d.ts +53 -0
  123. package/locales/mk.js +55 -0
  124. package/models/adapters.d.ts +6 -10
  125. package/models/timezone.d.ts +1 -1
  126. package/models/validation.d.ts +1 -1
  127. package/modern/AdapterDateFns/AdapterDateFns.js +1 -3
  128. package/modern/AdapterDateFnsJalali/AdapterDateFnsJalali.js +1 -3
  129. package/modern/AdapterDayjs/AdapterDayjs.js +2 -7
  130. package/modern/AdapterLuxon/AdapterLuxon.js +2 -23
  131. package/modern/AdapterMoment/AdapterMoment.js +2 -9
  132. package/modern/AdapterMomentHijri/AdapterMomentHijri.js +0 -3
  133. package/modern/AdapterMomentJalaali/AdapterMomentJalaali.js +0 -3
  134. package/modern/DateCalendar/DateCalendar.js +2 -8
  135. package/modern/DateCalendar/dayCalendarClasses.js +1 -1
  136. package/modern/DateCalendar/index.js +1 -1
  137. package/modern/DateCalendar/useCalendarState.js +1 -9
  138. package/modern/DateField/DateField.js +1 -1
  139. package/modern/DatePicker/DatePicker.js +1 -5
  140. package/modern/DateTimeField/DateTimeField.js +1 -9
  141. package/modern/DateTimePicker/DateTimePicker.js +1 -13
  142. package/modern/DesktopDatePicker/DesktopDatePicker.js +1 -5
  143. package/modern/DesktopDateTimePicker/DesktopDateTimePicker.js +1 -13
  144. package/modern/DesktopTimePicker/DesktopTimePicker.js +1 -9
  145. package/modern/DigitalClock/DigitalClock.js +3 -15
  146. package/modern/MobileDatePicker/MobileDatePicker.js +1 -5
  147. package/modern/MobileDateTimePicker/MobileDateTimePicker.js +1 -13
  148. package/modern/MobileTimePicker/MobileTimePicker.js +1 -9
  149. package/modern/MonthCalendar/MonthCalendar.js +1 -1
  150. package/modern/MultiSectionDigitalClock/MultiSectionDigitalClock.js +3 -15
  151. package/modern/PickersDay/PickersDay.js +1 -1
  152. package/modern/StaticDatePicker/StaticDatePicker.js +1 -5
  153. package/modern/StaticDateTimePicker/StaticDateTimePicker.js +1 -13
  154. package/modern/StaticTimePicker/StaticTimePicker.js +1 -9
  155. package/modern/TimeClock/Clock.js +1 -1
  156. package/modern/TimeClock/TimeClock.js +3 -15
  157. package/modern/TimeField/TimeField.js +1 -9
  158. package/modern/TimePicker/TimePicker.js +1 -9
  159. package/modern/YearCalendar/YearCalendar.js +1 -1
  160. package/modern/dateTimeViewRenderers/dateTimeViewRenderers.js +0 -4
  161. package/modern/dateViewRenderers/dateViewRenderers.js +0 -2
  162. package/modern/index.js +1 -1
  163. package/modern/internals/hooks/date-helpers-hooks.js +2 -2
  164. package/modern/internals/hooks/useField/useField.utils.js +8 -8
  165. package/modern/internals/hooks/useField/useFieldState.js +1 -1
  166. package/modern/internals/hooks/useUtils.js +1 -1
  167. package/modern/internals/hooks/useViews.js +2 -2
  168. package/modern/internals/utils/date-utils.js +2 -2
  169. package/modern/internals/utils/validation/extractValidationProps.js +1 -1
  170. package/modern/internals/utils/validation/validateDate.js +1 -1
  171. package/modern/internals/utils/validation/validateTime.js +1 -8
  172. package/modern/locales/deDE.js +2 -3
  173. package/modern/locales/index.js +1 -0
  174. package/modern/locales/mk.js +55 -0
  175. package/modern/timeViewRenderers/timeViewRenderers.js +0 -6
  176. package/node/AdapterDateFns/AdapterDateFns.js +1 -3
  177. package/node/AdapterDateFnsJalali/AdapterDateFnsJalali.js +1 -3
  178. package/node/AdapterDayjs/AdapterDayjs.js +2 -7
  179. package/node/AdapterLuxon/AdapterLuxon.js +2 -23
  180. package/node/AdapterMoment/AdapterMoment.js +2 -9
  181. package/node/AdapterMomentHijri/AdapterMomentHijri.js +0 -3
  182. package/node/AdapterMomentJalaali/AdapterMomentJalaali.js +0 -3
  183. package/node/DateCalendar/DateCalendar.js +2 -8
  184. package/node/DateCalendar/dayCalendarClasses.js +2 -2
  185. package/node/DateCalendar/index.js +2 -2
  186. package/node/DateCalendar/useCalendarState.js +1 -9
  187. package/node/DateField/DateField.js +1 -1
  188. package/node/DatePicker/DatePicker.js +1 -5
  189. package/node/DateTimeField/DateTimeField.js +1 -9
  190. package/node/DateTimePicker/DateTimePicker.js +1 -13
  191. package/node/DesktopDatePicker/DesktopDatePicker.js +1 -5
  192. package/node/DesktopDateTimePicker/DesktopDateTimePicker.js +1 -13
  193. package/node/DesktopTimePicker/DesktopTimePicker.js +1 -9
  194. package/node/DigitalClock/DigitalClock.js +3 -15
  195. package/node/MobileDatePicker/MobileDatePicker.js +1 -5
  196. package/node/MobileDateTimePicker/MobileDateTimePicker.js +1 -13
  197. package/node/MobileTimePicker/MobileTimePicker.js +1 -9
  198. package/node/MonthCalendar/MonthCalendar.js +1 -1
  199. package/node/MultiSectionDigitalClock/MultiSectionDigitalClock.js +3 -15
  200. package/node/PickersDay/PickersDay.js +1 -1
  201. package/node/StaticDatePicker/StaticDatePicker.js +1 -5
  202. package/node/StaticDateTimePicker/StaticDateTimePicker.js +1 -13
  203. package/node/StaticTimePicker/StaticTimePicker.js +1 -9
  204. package/node/TimeClock/Clock.js +1 -1
  205. package/node/TimeClock/TimeClock.js +3 -15
  206. package/node/TimeField/TimeField.js +1 -9
  207. package/node/TimePicker/TimePicker.js +1 -9
  208. package/node/YearCalendar/YearCalendar.js +1 -1
  209. package/node/dateTimeViewRenderers/dateTimeViewRenderers.js +0 -4
  210. package/node/dateViewRenderers/dateViewRenderers.js +0 -2
  211. package/node/index.js +1 -1
  212. package/node/internals/hooks/date-helpers-hooks.js +2 -2
  213. package/node/internals/hooks/useField/useField.utils.js +8 -8
  214. package/node/internals/hooks/useField/useFieldState.js +1 -1
  215. package/node/internals/hooks/useUtils.js +1 -1
  216. package/node/internals/hooks/useViews.js +2 -2
  217. package/node/internals/utils/date-utils.js +2 -2
  218. package/node/internals/utils/validation/extractValidationProps.js +1 -1
  219. package/node/internals/utils/validation/validateDate.js +1 -1
  220. package/node/internals/utils/validation/validateTime.js +1 -8
  221. package/node/locales/deDE.js +2 -3
  222. package/node/locales/index.js +11 -0
  223. package/node/locales/mk.js +60 -0
  224. package/node/timeViewRenderers/timeViewRenderers.js +0 -6
  225. package/package.json +7 -6
  226. package/timeViewRenderers/timeViewRenderers.d.ts +3 -3
  227. package/timeViewRenderers/timeViewRenderers.js +0 -6
@@ -1,6 +1,6 @@
1
1
  import _extends from "@babel/runtime/helpers/esm/extends";
2
2
  import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
3
- const _excluded = ["ampm", "ampmInClock", "autoFocus", "slots", "slotProps", "value", "defaultValue", "referenceDate", "disableIgnoringDatePartForTimeValidation", "maxTime", "minTime", "disableFuture", "disablePast", "minutesStep", "shouldDisableClock", "shouldDisableTime", "showViewSwitcher", "onChange", "view", "views", "openTo", "onViewChange", "focusedView", "onFocusedViewChange", "className", "disabled", "readOnly", "timezone"];
3
+ const _excluded = ["ampm", "ampmInClock", "autoFocus", "slots", "slotProps", "value", "defaultValue", "referenceDate", "disableIgnoringDatePartForTimeValidation", "maxTime", "minTime", "disableFuture", "disablePast", "minutesStep", "shouldDisableTime", "showViewSwitcher", "onChange", "view", "views", "openTo", "onViewChange", "focusedView", "onFocusedViewChange", "className", "disabled", "readOnly", "timezone"];
4
4
  import * as React from 'react';
5
5
  import clsx from 'clsx';
6
6
  import PropTypes from 'prop-types';
@@ -81,7 +81,6 @@ export const TimeClock = /*#__PURE__*/React.forwardRef(function TimeClock(inProp
81
81
  disableFuture,
82
82
  disablePast,
83
83
  minutesStep = 1,
84
- shouldDisableClock,
85
84
  shouldDisableTime,
86
85
  showViewSwitcher,
87
86
  onChange,
@@ -162,9 +161,6 @@ export const TimeClock = /*#__PURE__*/React.forwardRef(function TimeClock(inProp
162
161
  if (timeValue % step !== 0) {
163
162
  return false;
164
163
  }
165
- if (shouldDisableClock != null && shouldDisableClock(timeValue, viewType)) {
166
- return false;
167
- }
168
164
  if (shouldDisableTime) {
169
165
  switch (viewType) {
170
166
  case 'hours':
@@ -214,7 +210,7 @@ export const TimeClock = /*#__PURE__*/React.forwardRef(function TimeClock(inProp
214
210
  default:
215
211
  throw new Error('not supported');
216
212
  }
217
- }, [ampm, valueOrReferenceDate, disableIgnoringDatePartForTimeValidation, maxTime, meridiemMode, minTime, minutesStep, shouldDisableClock, shouldDisableTime, utils, disableFuture, disablePast, now, views]);
213
+ }, [ampm, valueOrReferenceDate, disableIgnoringDatePartForTimeValidation, maxTime, meridiemMode, minTime, minutesStep, shouldDisableTime, utils, disableFuture, disablePast, now, views]);
218
214
  const selectedId = useId();
219
215
  const viewProps = React.useMemo(() => {
220
216
  switch (view) {
@@ -422,14 +418,6 @@ process.env.NODE_ENV !== "production" ? TimeClock.propTypes = {
422
418
  * @default The closest valid time using the validation props, except callbacks such as `shouldDisableTime`.
423
419
  */
424
420
  referenceDate: PropTypes.any,
425
- /**
426
- * Disable specific clock time.
427
- * @param {number} clockValue The value to check.
428
- * @param {TimeView} view The clock type of the timeValue.
429
- * @returns {boolean} If `true` the time will be disabled.
430
- * @deprecated Consider using `shouldDisableTime`.
431
- */
432
- shouldDisableClock: PropTypes.func,
433
421
  /**
434
422
  * Disable specific time.
435
423
  * @template TDate
@@ -457,7 +445,7 @@ process.env.NODE_ENV !== "production" ? TimeClock.propTypes = {
457
445
  * Choose which timezone to use for the value.
458
446
  * Example: "default", "system", "UTC", "America/New_York".
459
447
  * If you pass values from other timezones to some props, they will be converted to this timezone before being used.
460
- * @see See the {@link https://mui.com/x/react-date-pickers/timezone/ timezones documention} for more details.
448
+ * @see See the {@link https://mui.com/x/react-date-pickers/timezone/ timezones documentation} for more details.
461
449
  * @default The timezone of the `value` or `defaultValue` prop is defined, 'default' otherwise.
462
450
  */
463
451
  timezone: PropTypes.string,
@@ -287,14 +287,6 @@ process.env.NODE_ENV !== "production" ? TimeField.propTypes = {
287
287
  endIndex: PropTypes.number.isRequired,
288
288
  startIndex: PropTypes.number.isRequired
289
289
  })]),
290
- /**
291
- * Disable specific clock time.
292
- * @param {number} clockValue The value to check.
293
- * @param {TimeView} view The clock type of the timeValue.
294
- * @returns {boolean} If `true` the time will be disabled.
295
- * @deprecated Consider using `shouldDisableTime`.
296
- */
297
- shouldDisableClock: PropTypes.func,
298
290
  /**
299
291
  * Disable specific time.
300
292
  * @template TDate
@@ -341,7 +333,7 @@ process.env.NODE_ENV !== "production" ? TimeField.propTypes = {
341
333
  * Choose which timezone to use for the value.
342
334
  * Example: "default", "system", "UTC", "America/New_York".
343
335
  * If you pass values from other timezones to some props, they will be converted to this timezone before being used.
344
- * @see See the {@link https://mui.com/x/react-date-pickers/timezone/ timezones documention} for more details.
336
+ * @see See the {@link https://mui.com/x/react-date-pickers/timezone/ timezones documentation} for more details.
345
337
  * @default The timezone of the `value` or `defaultValue` prop is defined, 'default' otherwise.
346
338
  */
347
339
  timezone: PropTypes.string,
@@ -233,14 +233,6 @@ process.env.NODE_ENV !== "production" ? TimePicker.propTypes = {
233
233
  endIndex: PropTypes.number.isRequired,
234
234
  startIndex: PropTypes.number.isRequired
235
235
  })]),
236
- /**
237
- * Disable specific clock time.
238
- * @param {number} clockValue The value to check.
239
- * @param {TimeView} view The clock type of the timeValue.
240
- * @returns {boolean} If `true` the time will be disabled.
241
- * @deprecated Consider using `shouldDisableTime`.
242
- */
243
- shouldDisableClock: PropTypes.func,
244
236
  /**
245
237
  * Disable specific time.
246
238
  * @template TDate
@@ -288,7 +280,7 @@ process.env.NODE_ENV !== "production" ? TimePicker.propTypes = {
288
280
  * Choose which timezone to use for the value.
289
281
  * Example: "default", "system", "UTC", "America/New_York".
290
282
  * If you pass values from other timezones to some props, they will be converted to this timezone before being used.
291
- * @see See the {@link https://mui.com/x/react-date-pickers/timezone/ timezones documention} for more details.
283
+ * @see See the {@link https://mui.com/x/react-date-pickers/timezone/ timezones documentation} for more details.
292
284
  * @default The timezone of the `value` or `defaultValue` prop is defined, 'default' otherwise.
293
285
  */
294
286
  timezone: PropTypes.string,
@@ -336,7 +336,7 @@ process.env.NODE_ENV !== "production" ? YearCalendar.propTypes = {
336
336
  * Choose which timezone to use for the value.
337
337
  * Example: "default", "system", "UTC", "America/New_York".
338
338
  * If you pass values from other timezones to some props, they will be converted to this timezone before being used.
339
- * @see See the {@link https://mui.com/x/react-date-pickers/timezone/ timezones documention} for more details.
339
+ * @see See the {@link https://mui.com/x/react-date-pickers/timezone/ timezones documentation} for more details.
340
340
  * @default The timezone of the `value` or `defaultValue` prop is defined, 'default' otherwise.
341
341
  */
342
342
  timezone: PropTypes.string,
@@ -11,4 +11,4 @@ export interface DateTimeViewRendererProps<TDate> extends Omit<DateCalendarProps
11
11
  timeViewsCount: number;
12
12
  shouldRenderTimeInASingleColumn: boolean;
13
13
  }
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, slots, slotProps, loading, renderLoading, disableHighlightToday, readOnly, disabled, showDaysOutsideCurrentMonth, dayOfWeekFormatter, sx, autoFocus, fixedWeekNumber, displayWeekNumber, timezone, disableIgnoringDatePartForTimeValidation, timeSteps, skipDisabled, timeViewsCount, shouldRenderTimeInASingleColumn, }: 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, reduceAnimations, minutesStep, ampm, onMonthChange, monthsPerRow, onYearChange, yearsPerRow, slots, slotProps, loading, renderLoading, disableHighlightToday, readOnly, disabled, showDaysOutsideCurrentMonth, dayOfWeekFormatter, sx, autoFocus, fixedWeekNumber, displayWeekNumber, timezone, disableIgnoringDatePartForTimeValidation, timeSteps, skipDisabled, timeViewsCount, shouldRenderTimeInASingleColumn, }: DateTimeViewRendererProps<TDate>) => React.JSX.Element;
@@ -34,7 +34,6 @@ export const renderDesktopDateTimeView = ({
34
34
  shouldDisableMonth,
35
35
  shouldDisableYear,
36
36
  shouldDisableTime,
37
- shouldDisableClock,
38
37
  reduceAnimations,
39
38
  minutesStep,
40
39
  ampm,
@@ -42,7 +41,6 @@ export const renderDesktopDateTimeView = ({
42
41
  monthsPerRow,
43
42
  onYearChange,
44
43
  yearsPerRow,
45
- defaultCalendarMonth,
46
44
  slots,
47
45
  slotProps,
48
46
  loading,
@@ -82,7 +80,6 @@ export const renderDesktopDateTimeView = ({
82
80
  minTime,
83
81
  maxTime,
84
82
  shouldDisableTime,
85
- shouldDisableClock,
86
83
  minutesStep,
87
84
  ampm,
88
85
  slots,
@@ -121,7 +118,6 @@ export const renderDesktopDateTimeView = ({
121
118
  monthsPerRow: monthsPerRow,
122
119
  onYearChange: onYearChange,
123
120
  yearsPerRow: yearsPerRow,
124
- defaultCalendarMonth: defaultCalendarMonth,
125
121
  slots: slots,
126
122
  slotProps: slotProps,
127
123
  loading: loading,
@@ -8,4 +8,4 @@ export interface DateViewRendererProps<TDate, TView extends DateOrTimeViewWithMe
8
8
  views: readonly TView[];
9
9
  focusedView: TView | null;
10
10
  }
11
- export declare const renderDateViewCalendar: <TDate extends unknown>({ view, onViewChange, views, focusedView, onFocusedViewChange, value, defaultValue, referenceDate, onChange, className, classes, disableFuture, disablePast, minDate, maxDate, shouldDisableDate, shouldDisableMonth, shouldDisableYear, reduceAnimations, onMonthChange, monthsPerRow, onYearChange, yearsPerRow, defaultCalendarMonth, slots, slotProps, loading, renderLoading, disableHighlightToday, readOnly, disabled, showDaysOutsideCurrentMonth, dayOfWeekFormatter, sx, autoFocus, fixedWeekNumber, displayWeekNumber, timezone, }: DateViewRendererProps<TDate, DateView>) => React.JSX.Element;
11
+ export declare const renderDateViewCalendar: <TDate extends unknown>({ view, onViewChange, views, focusedView, onFocusedViewChange, value, defaultValue, referenceDate, onChange, className, classes, disableFuture, disablePast, minDate, maxDate, shouldDisableDate, shouldDisableMonth, shouldDisableYear, reduceAnimations, onMonthChange, monthsPerRow, onYearChange, yearsPerRow, slots, slotProps, loading, renderLoading, disableHighlightToday, readOnly, disabled, showDaysOutsideCurrentMonth, dayOfWeekFormatter, sx, autoFocus, fixedWeekNumber, displayWeekNumber, timezone, }: DateViewRendererProps<TDate, DateView>) => React.JSX.Element;
@@ -26,7 +26,6 @@ export const renderDateViewCalendar = ({
26
26
  monthsPerRow,
27
27
  onYearChange,
28
28
  yearsPerRow,
29
- defaultCalendarMonth,
30
29
  slots,
31
30
  slotProps,
32
31
  loading,
@@ -65,7 +64,6 @@ export const renderDateViewCalendar = ({
65
64
  monthsPerRow: monthsPerRow,
66
65
  onYearChange: onYearChange,
67
66
  yearsPerRow: yearsPerRow,
68
- defaultCalendarMonth: defaultCalendarMonth,
69
67
  slots: slots,
70
68
  slotProps: slotProps,
71
69
  loading: loading,
package/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @mui/x-date-pickers v7.0.0-alpha.1
2
+ * @mui/x-date-pickers v7.0.0-alpha.2
3
3
  *
4
4
  * @license MIT
5
5
  * This source code is licensed under the MIT license found in the
@@ -8,7 +8,7 @@ export function useNextMonthDisabled(month, {
8
8
  }) {
9
9
  const utils = useUtils();
10
10
  return React.useMemo(() => {
11
- const now = utils.dateWithTimezone(undefined, timezone);
11
+ const now = utils.date(undefined, timezone);
12
12
  const lastEnabledMonth = utils.startOfMonth(disableFuture && utils.isBefore(now, maxDate) ? now : maxDate);
13
13
  return !utils.isAfter(lastEnabledMonth, month);
14
14
  }, [disableFuture, maxDate, month, utils, timezone]);
@@ -20,7 +20,7 @@ export function usePreviousMonthDisabled(month, {
20
20
  }) {
21
21
  const utils = useUtils();
22
22
  return React.useMemo(() => {
23
- const now = utils.dateWithTimezone(undefined, timezone);
23
+ const now = utils.date(undefined, timezone);
24
24
  const firstEnabledMonth = utils.startOfMonth(disablePast && utils.isAfter(now, minDate) ? now : minDate);
25
25
  return !utils.isBefore(firstEnabledMonth, month);
26
26
  }, [disablePast, minDate, month, utils, timezone]);
@@ -34,7 +34,7 @@ const getDeltaFromKeyCode = keyCode => {
34
34
  };
35
35
  export const getDaysInWeekStr = (utils, timezone, format) => {
36
36
  const elements = [];
37
- const now = utils.dateWithTimezone(undefined, timezone);
37
+ const now = utils.date(undefined, timezone);
38
38
  const startDate = utils.startOfWeek(now);
39
39
  const endDate = utils.endOfWeek(now);
40
40
  let current = startDate;
@@ -48,7 +48,7 @@ export const getLetterEditingOptions = (utils, timezone, sectionType, format) =>
48
48
  switch (sectionType) {
49
49
  case 'month':
50
50
  {
51
- return getMonthsInYear(utils, utils.dateWithTimezone(undefined, timezone)).map(month => utils.formatByString(month, format));
51
+ return getMonthsInYear(utils, utils.date(undefined, timezone)).map(month => utils.formatByString(month, format));
52
52
  }
53
53
  case 'weekDay':
54
54
  {
@@ -56,7 +56,7 @@ export const getLetterEditingOptions = (utils, timezone, sectionType, format) =>
56
56
  }
57
57
  case 'meridiem':
58
58
  {
59
- const now = utils.dateWithTimezone(undefined, timezone);
59
+ const now = utils.date(undefined, timezone);
60
60
  return [utils.startOfDay(now), utils.endOfDay(now)].map(date => utils.formatByString(date, format));
61
61
  }
62
62
  default:
@@ -113,7 +113,7 @@ export const adjustSectionValue = (utils, timezone, section, keyCode, sectionsVa
113
113
  let newSectionValueNumber = currentSectionValue + delta * step;
114
114
  if (shouldSetAbsolute) {
115
115
  if (section.type === 'year' && !isEnd && !isStart) {
116
- return utils.formatByString(utils.dateWithTimezone(undefined, timezone), section.format);
116
+ return utils.formatByString(utils.date(undefined, timezone), section.format);
117
117
  }
118
118
  if (delta > 0 || isStart) {
119
119
  newSectionValueNumber = sectionBoundaries.minimum;
@@ -212,7 +212,7 @@ const getSectionPlaceholder = (utils, timezone, localeText, sectionConfig, curre
212
212
  case 'year':
213
213
  {
214
214
  return localeText.fieldYearPlaceholder({
215
- digitAmount: utils.formatByString(utils.dateWithTimezone(undefined, timezone), currentTokenValue).length
215
+ digitAmount: utils.formatByString(utils.date(undefined, timezone), currentTokenValue).length
216
216
  });
217
217
  }
218
218
  case 'month':
@@ -261,12 +261,12 @@ export const changeSectionValueFormat = (utils, valueStr, currentFormat, newForm
261
261
  }
262
262
  return utils.formatByString(utils.parse(valueStr, currentFormat), newFormat);
263
263
  };
264
- const isFourDigitYearFormat = (utils, timezone, format) => utils.formatByString(utils.dateWithTimezone(undefined, timezone), format).length === 4;
264
+ const isFourDigitYearFormat = (utils, timezone, format) => utils.formatByString(utils.date(undefined, timezone), format).length === 4;
265
265
  export const doesSectionFormatHaveLeadingZeros = (utils, timezone, contentType, sectionType, format) => {
266
266
  if (contentType !== 'digit') {
267
267
  return false;
268
268
  }
269
- const now = utils.dateWithTimezone(undefined, timezone);
269
+ const now = utils.date(undefined, timezone);
270
270
  switch (sectionType) {
271
271
  // We can't use `changeSectionValueFormat`, because `utils.parse('1', 'YYYY')` returns `1971` instead of `1`.
272
272
  case 'year':
@@ -472,7 +472,7 @@ export const createDateStrForInputFromSections = (sections, isRTL) => {
472
472
  return `\u2066${dateStr}\u2069`;
473
473
  };
474
474
  export const getSectionsBoundaries = (utils, timezone) => {
475
- const today = utils.dateWithTimezone(undefined, timezone);
475
+ const today = utils.date(undefined, timezone);
476
476
  const endOfYear = utils.endOfYear(today);
477
477
  const endOfDay = utils.endOfDay(today);
478
478
  const {
@@ -156,7 +156,7 @@ export const useFieldState = params => {
156
156
  const nonEmptySectionCountBefore = activeDateManager.getSections(state.sections).filter(section => section.value !== '').length;
157
157
  const hasNoOtherNonEmptySections = nonEmptySectionCountBefore === (activeSection.value === '' ? 0 : 1);
158
158
  const newSections = setSectionValue(selectedSectionIndexes.startIndex, '');
159
- const newActiveDate = hasNoOtherNonEmptySections ? null : utils.date(new Date(''));
159
+ const newActiveDate = hasNoOtherNonEmptySections ? null : utils.getInvalidDate();
160
160
  const newValues = activeDateManager.getNewValuesFromNewActiveDate(newActiveDate);
161
161
  if ((newActiveDate != null && !utils.isValid(newActiveDate)) !== (activeDateManager.date != null && !utils.isValid(activeDateManager.date))) {
162
162
  publishValue(_extends({}, newValues, {
@@ -132,7 +132,7 @@ export interface UsePickerValueState<TValue> {
132
132
  * Then we might want to apply some custom logic.
133
133
  *
134
134
  * For example, when the component is not controlled and `defaultValue` is defined.
135
- * Then clicking on "Accept", "Today" or "Clear" should fire `onAccept` with `defaultValue`, but clicking on "Cancel" or dimissing the picker should not.
135
+ * Then clicking on "Accept", "Today" or "Clear" should fire `onAccept` with `defaultValue`, but clicking on "Cancel" or dismissing the picker should not.
136
136
  */
137
137
  hasBeenModifiedSinceMount: boolean;
138
138
  }
@@ -22,7 +22,7 @@ export const useNow = timezone => {
22
22
  const utils = useUtils();
23
23
  const now = React.useRef();
24
24
  if (now.current === undefined) {
25
- now.current = utils.dateWithTimezone(undefined, timezone);
25
+ now.current = utils.date(undefined, timezone);
26
26
  }
27
27
  return now.current;
28
28
  };
@@ -84,7 +84,7 @@ export function useViews({
84
84
  const isSelectionFinishedOnCurrentView = currentViewSelectionState === 'finish';
85
85
  const hasMoreViews = selectedView ?
86
86
  // handles case like `DateTimePicker`, where a view might return a `finish` selection state
87
- // but we it's not the final view given all `views` -> overall selection state should be `partial`.
87
+ // but when it's not the final view given all `views` -> overall selection state should be `partial`.
88
88
  views.indexOf(selectedView) < views.length - 1 : Boolean(nextView);
89
89
  const globalSelectionState = isSelectionFinishedOnCurrentView && hasMoreViews ? 'partial' : currentViewSelectionState;
90
90
  onChange(value, globalSelectionState);
@@ -106,7 +106,7 @@ export function useViews({
106
106
  setFocusedView: handleFocusedViewChange,
107
107
  nextView,
108
108
  previousView,
109
- // Always return up to date default view instead of the initial one (i.e. defaultView.current)
109
+ // Always return up-to-date default view instead of the initial one (i.e. defaultView.current)
110
110
  defaultView: views.includes(openTo) ? openTo : views[0],
111
111
  goToNextView,
112
112
  setValueAndGoToNextView,
@@ -44,14 +44,6 @@ export interface TimeValidationProps<TDate> {
44
44
  * @returns {boolean} If `true` the time will be disabled.
45
45
  */
46
46
  shouldDisableTime?: (value: TDate, view: TimeView) => boolean;
47
- /**
48
- * Disable specific clock time.
49
- * @param {number} clockValue The value to check.
50
- * @param {TimeView} view The clock type of the timeValue.
51
- * @returns {boolean} If `true` the time will be disabled.
52
- * @deprecated Consider using `shouldDisableTime`.
53
- */
54
- shouldDisableClock?: (clockValue: number, view: TimeView) => boolean;
55
47
  /**
56
48
  * Do not ignore date part when validating min/max time.
57
49
  * @default false
@@ -9,7 +9,7 @@ export const findClosestEnabledDate = ({
9
9
  utils,
10
10
  timezone
11
11
  }) => {
12
- const today = utils.startOfDay(utils.dateWithTimezone(undefined, timezone));
12
+ const today = utils.startOfDay(utils.date(undefined, timezone));
13
13
  if (disablePast && utils.isBefore(minDate, today)) {
14
14
  minDate = today;
15
15
  }
@@ -79,7 +79,7 @@ export const mergeDateAndTime = (utils, dateParam, timeParam) => {
79
79
  mergedDate = utils.setSeconds(mergedDate, utils.getSeconds(timeParam));
80
80
  return mergedDate;
81
81
  };
82
- export const getTodayDate = (utils, timezone, valueType) => valueType === 'date' ? utils.startOfDay(utils.dateWithTimezone(undefined, timezone)) : utils.dateWithTimezone(undefined, timezone);
82
+ export const getTodayDate = (utils, timezone, valueType) => valueType === 'date' ? utils.startOfDay(utils.date(undefined, timezone)) : utils.date(undefined, timezone);
83
83
  export const formatMeridiem = (utils, meridiem) => {
84
84
  const date = utils.setHours(utils.date(), meridiem === 'am' ? 2 : 14);
85
85
  return utils.format(date, 'meridiem');
@@ -8,4 +8,4 @@ export declare const DATE_TIME_VALIDATION_PROP_NAMES: (keyof DateTimeValidationP
8
8
  */
9
9
  export declare const extractValidationProps: <Props extends {
10
10
  [key: string]: any;
11
- }>(props: Props) => Pick<Props, "ampm" | "disableFuture" | "disablePast" | "maxDate" | "minDate" | "minutesStep" | "shouldDisableDate" | "shouldDisableMonth" | "shouldDisableYear" | "minTime" | "maxTime" | "shouldDisableTime" | "shouldDisableClock" | "disableIgnoringDatePartForTimeValidation" | "minDateTime" | "maxDateTime">;
11
+ }>(props: Props) => Pick<Props, "ampm" | "disableFuture" | "disablePast" | "maxDate" | "minDate" | "minutesStep" | "shouldDisableDate" | "shouldDisableMonth" | "shouldDisableYear" | "minTime" | "maxTime" | "shouldDisableTime" | "disableIgnoringDatePartForTimeValidation" | "minDateTime" | "maxDateTime">;
@@ -1,5 +1,5 @@
1
1
  export const DATE_VALIDATION_PROP_NAMES = ['disablePast', 'disableFuture', 'minDate', 'maxDate', 'shouldDisableDate', 'shouldDisableMonth', 'shouldDisableYear'];
2
- export const TIME_VALIDATION_PROP_NAMES = ['disablePast', 'disableFuture', 'minTime', 'maxTime', 'shouldDisableClock', 'shouldDisableTime', 'minutesStep', 'ampm', 'disableIgnoringDatePartForTimeValidation'];
2
+ export const TIME_VALIDATION_PROP_NAMES = ['disablePast', 'disableFuture', 'minTime', 'maxTime', 'shouldDisableTime', 'minutesStep', 'ampm', 'disableIgnoringDatePartForTimeValidation'];
3
3
  export const DATE_TIME_VALIDATION_PROP_NAMES = ['minDateTime', 'maxDateTime'];
4
4
  const VALIDATION_PROP_NAMES = [...DATE_VALIDATION_PROP_NAMES, ...TIME_VALIDATION_PROP_NAMES, ...DATE_TIME_VALIDATION_PROP_NAMES];
5
5
  /**
@@ -15,7 +15,7 @@ export const validateDate = ({
15
15
  disableFuture,
16
16
  timezone
17
17
  } = props;
18
- const now = adapter.utils.dateWithTimezone(undefined, timezone);
18
+ const now = adapter.utils.date(undefined, timezone);
19
19
  const minDate = applyDefaultDate(adapter.utils, props.minDate, adapter.defaultDates.minDate);
20
20
  const maxDate = applyDefaultDate(adapter.utils, props.maxDate, adapter.defaultDates.maxDate);
21
21
  switch (true) {
@@ -11,14 +11,13 @@ export const validateTime = ({
11
11
  minTime,
12
12
  maxTime,
13
13
  minutesStep,
14
- shouldDisableClock,
15
14
  shouldDisableTime,
16
15
  disableIgnoringDatePartForTimeValidation = false,
17
16
  disablePast,
18
17
  disableFuture,
19
18
  timezone
20
19
  } = props;
21
- const now = adapter.utils.dateWithTimezone(undefined, timezone);
20
+ const now = adapter.utils.date(undefined, timezone);
22
21
  const isAfter = createIsAfterIgnoreDatePart(disableIgnoringDatePartForTimeValidation, adapter.utils);
23
22
  switch (true) {
24
23
  case !adapter.utils.isValid(value):
@@ -37,12 +36,6 @@ export const validateTime = ({
37
36
  return 'shouldDisableTime-minutes';
38
37
  case Boolean(shouldDisableTime && shouldDisableTime(value, 'seconds')):
39
38
  return 'shouldDisableTime-seconds';
40
- case Boolean(shouldDisableClock && shouldDisableClock(adapter.utils.getHours(value), 'hours')):
41
- return 'shouldDisableClock-hours';
42
- case Boolean(shouldDisableClock && shouldDisableClock(adapter.utils.getMinutes(value), 'minutes')):
43
- return 'shouldDisableClock-minutes';
44
- case Boolean(shouldDisableClock && shouldDisableClock(adapter.utils.getSeconds(value), 'seconds')):
45
- return 'shouldDisableClock-seconds';
46
39
  case Boolean(minutesStep && adapter.utils.getMinutes(value) % minutesStep !== 0):
47
40
  return 'minutesStep';
48
41
  default:
@@ -288,8 +288,8 @@ export var AdapterDateFns = /*#__PURE__*/_createClass(function AdapterDateFns()
288
288
  }
289
289
  return new Date(value);
290
290
  };
291
- this.dateWithTimezone = function (value) {
292
- return _this.date(value);
291
+ this.getInvalidDate = function () {
292
+ return new Date('Invalid Date');
293
293
  };
294
294
  this.getTimezone = function () {
295
295
  return 'default';
@@ -300,8 +300,8 @@ export var AdapterDateFnsJalali = /*#__PURE__*/_createClass(function AdapterDate
300
300
  }
301
301
  return new Date(value);
302
302
  };
303
- this.dateWithTimezone = function (value) {
304
- return _this.date(value);
303
+ this.getInvalidDate = function () {
304
+ return new Date('Invalid Date');
305
305
  };
306
306
  this.getTimezone = function () {
307
307
  return 'default';
@@ -272,12 +272,7 @@ export var AdapterDayjs = /*#__PURE__*/_createClass(function AdapterDayjs() {
272
272
  return value;
273
273
  };
274
274
  this.date = function (value) {
275
- if (value === null) {
276
- return null;
277
- }
278
- return _this.dayjs(value);
279
- };
280
- this.dateWithTimezone = function (value, timezone) {
275
+ var timezone = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'default';
281
276
  if (value === null) {
282
277
  return null;
283
278
  }
@@ -294,6 +289,9 @@ export var AdapterDayjs = /*#__PURE__*/_createClass(function AdapterDayjs() {
294
289
  }
295
290
  return parsedValue.locale(_this.locale);
296
291
  };
292
+ this.getInvalidDate = function () {
293
+ return defaultDayjs(new Date('Invalid date'));
294
+ };
297
295
  this.getTimezone = function (value) {
298
296
  if (_this.hasTimezonePlugin()) {
299
297
  var _value$$x;
@@ -184,28 +184,7 @@ export var AdapterLuxon = /*#__PURE__*/_createClass(function AdapterLuxon() {
184
184
  return value.setLocale(expectedLocale);
185
185
  };
186
186
  this.date = function (value) {
187
- if (typeof value === 'undefined') {
188
- return DateTime.local();
189
- }
190
- if (value === null) {
191
- return null;
192
- }
193
- if (typeof value === 'string') {
194
- // @ts-ignore
195
- return DateTime.fromJSDate(new Date(value), {
196
- locale: _this.locale
197
- });
198
- }
199
- if (DateTime.isDateTime(value)) {
200
- return value;
201
- }
202
-
203
- // @ts-ignore
204
- return DateTime.fromJSDate(value, {
205
- locale: _this.locale
206
- });
207
- };
208
- this.dateWithTimezone = function (value, timezone) {
187
+ var timezone = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'default';
209
188
  if (value === null) {
210
189
  return null;
211
190
  }
@@ -223,6 +202,9 @@ export var AdapterLuxon = /*#__PURE__*/_createClass(function AdapterLuxon() {
223
202
  zone: timezone
224
203
  });
225
204
  };
205
+ this.getInvalidDate = function () {
206
+ return DateTime.fromJSDate(new Date('Invalid Date'));
207
+ };
226
208
  this.getTimezone = function (value) {
227
209
  // When using the system zone, we want to return "system", not something like "Europe/Paris"
228
210
  if (value.zone.type === 'system') {
@@ -204,14 +204,7 @@ export var AdapterMoment = /*#__PURE__*/_createClass(function AdapterMoment() {
204
204
  return parsedValue.locale(_this.locale);
205
205
  };
206
206
  this.date = function (value) {
207
- if (value === null) {
208
- return null;
209
- }
210
- var moment = _this.moment(value);
211
- moment.locale(_this.getCurrentLocaleCode());
212
- return moment;
213
- };
214
- this.dateWithTimezone = function (value, timezone) {
207
+ var timezone = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'default';
215
208
  if (value === null) {
216
209
  return null;
217
210
  }
@@ -223,6 +216,9 @@ export var AdapterMoment = /*#__PURE__*/_createClass(function AdapterMoment() {
223
216
  }
224
217
  return _this.createTZDate(value, timezone);
225
218
  };
219
+ this.getInvalidDate = function () {
220
+ return _this.moment(new Date('Invalid Date'));
221
+ };
226
222
  this.getTimezone = function (value) {
227
223
  var _value$_z, _ref2, _this$moment$defaultZ;
228
224
  // @ts-ignore
@@ -159,9 +159,6 @@ export var AdapterMomentHijri = /*#__PURE__*/function (_AdapterMoment) {
159
159
  }
160
160
  return _this.moment(value).locale('ar-SA');
161
161
  };
162
- _this.dateWithTimezone = function (value) {
163
- return _this.date(value);
164
- };
165
162
  _this.getTimezone = function () {
166
163
  return 'default';
167
164
  };
@@ -157,9 +157,6 @@ export var AdapterMomentJalaali = /*#__PURE__*/function (_AdapterMoment) {
157
157
  }
158
158
  return _this.moment(value).locale('fa');
159
159
  };
160
- _this.dateWithTimezone = function (value) {
161
- return _this.date(value);
162
- };
163
160
  _this.getTimezone = function () {
164
161
  return 'default';
165
162
  };
@@ -1,6 +1,6 @@
1
1
  import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
2
2
  import _extends from "@babel/runtime/helpers/esm/extends";
3
- var _excluded = ["autoFocus", "onViewChange", "value", "defaultValue", "referenceDate", "disableFuture", "disablePast", "defaultCalendarMonth", "onChange", "onYearChange", "onMonthChange", "reduceAnimations", "shouldDisableDate", "shouldDisableMonth", "shouldDisableYear", "view", "views", "openTo", "className", "disabled", "readOnly", "minDate", "maxDate", "disableHighlightToday", "focusedView", "onFocusedViewChange", "showDaysOutsideCurrentMonth", "fixedWeekNumber", "dayOfWeekFormatter", "slots", "slotProps", "loading", "renderLoading", "displayWeekNumber", "yearsPerRow", "monthsPerRow", "timezone"];
3
+ var _excluded = ["autoFocus", "onViewChange", "value", "defaultValue", "referenceDate", "disableFuture", "disablePast", "onChange", "onYearChange", "onMonthChange", "reduceAnimations", "shouldDisableDate", "shouldDisableMonth", "shouldDisableYear", "view", "views", "openTo", "className", "disabled", "readOnly", "minDate", "maxDate", "disableHighlightToday", "focusedView", "onFocusedViewChange", "showDaysOutsideCurrentMonth", "fixedWeekNumber", "dayOfWeekFormatter", "slots", "slotProps", "loading", "renderLoading", "displayWeekNumber", "yearsPerRow", "monthsPerRow", "timezone"];
4
4
  import * as React from 'react';
5
5
  import PropTypes from 'prop-types';
6
6
  import clsx from 'clsx';
@@ -98,7 +98,6 @@ export var DateCalendar = /*#__PURE__*/React.forwardRef(function DateCalendar(in
98
98
  referenceDateProp = props.referenceDate,
99
99
  disableFuture = props.disableFuture,
100
100
  disablePast = props.disablePast,
101
- defaultCalendarMonth = props.defaultCalendarMonth,
102
101
  onChange = props.onChange,
103
102
  onYearChange = props.onYearChange,
104
103
  onMonthChange = props.onMonthChange,
@@ -158,7 +157,6 @@ export var DateCalendar = /*#__PURE__*/React.forwardRef(function DateCalendar(in
158
157
  setValueAndGoToNextView = _useViews.setValueAndGoToNextView;
159
158
  var _useCalendarState = useCalendarState({
160
159
  value: value,
161
- defaultCalendarMonth: defaultCalendarMonth,
162
160
  referenceDate: referenceDateProp,
163
161
  reduceAnimations: reduceAnimations,
164
162
  onMonthChange: onMonthChange,
@@ -376,10 +374,6 @@ process.env.NODE_ENV !== "production" ? DateCalendar.propTypes = {
376
374
  * @default (_day: string, date: TDate) => adapter.format(date, 'weekdayShort').charAt(0).toUpperCase()
377
375
  */
378
376
  dayOfWeekFormatter: PropTypes.func,
379
- /**
380
- * Default calendar month displayed when `value` and `defaultValue` are empty.
381
- */
382
- defaultCalendarMonth: PropTypes.any,
383
377
  /**
384
378
  * The default selected value.
385
379
  * Used when the component is not controlled.
@@ -550,7 +544,7 @@ process.env.NODE_ENV !== "production" ? DateCalendar.propTypes = {
550
544
  * Choose which timezone to use for the value.
551
545
  * Example: "default", "system", "UTC", "America/New_York".
552
546
  * If you pass values from other timezones to some props, they will be converted to this timezone before being used.
553
- * @see See the {@link https://mui.com/x/react-date-pickers/timezone/ timezones documention} for more details.
547
+ * @see See the {@link https://mui.com/x/react-date-pickers/timezone/ timezones documentation} for more details.
554
548
  * @default The timezone of the `value` or `defaultValue` prop is defined, 'default' otherwise.
555
549
  */
556
550
  timezone: PropTypes.string,