@mui/x-date-pickers 6.16.0 → 6.16.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 (224) hide show
  1. package/AdapterDayjs/AdapterDayjs.js +6 -4
  2. package/AdapterMoment/AdapterMoment.js +2 -5
  3. package/CHANGELOG.md +165 -1
  4. package/DateCalendar/DateCalendar.js +3 -1
  5. package/DateCalendar/DayCalendar.js +2 -2
  6. package/DateCalendar/PickersFadeTransitionGroup.js +6 -6
  7. package/DateCalendar/PickersSlideTransition.d.ts +0 -1
  8. package/DateCalendar/PickersSlideTransition.js +5 -5
  9. package/DateField/DateField.d.ts +10 -0
  10. package/DateField/DateField.js +10 -0
  11. package/DateTimeField/DateTimeField.d.ts +10 -0
  12. package/DateTimeField/DateTimeField.js +10 -0
  13. package/DateTimePicker/DateTimePicker.d.ts +10 -0
  14. package/DateTimePicker/DateTimePicker.js +15 -0
  15. package/DesktopDateTimePicker/DesktopDateTimePicker.d.ts +10 -0
  16. package/DesktopDateTimePicker/DesktopDateTimePicker.js +25 -7
  17. package/DesktopDateTimePicker/DesktopDateTimePicker.types.d.ts +4 -3
  18. package/DesktopTimePicker/DesktopTimePicker.d.ts +10 -0
  19. package/DesktopTimePicker/DesktopTimePicker.js +18 -9
  20. package/DigitalClock/DigitalClock.js +1 -1
  21. package/MobileDateTimePicker/MobileDateTimePicker.d.ts +10 -0
  22. package/MobileDateTimePicker/MobileDateTimePicker.js +10 -0
  23. package/MobileTimePicker/MobileTimePicker.d.ts +10 -0
  24. package/MobileTimePicker/MobileTimePicker.js +10 -0
  25. package/MonthCalendar/MonthCalendar.js +4 -1
  26. package/StaticDateTimePicker/StaticDateTimePicker.d.ts +10 -0
  27. package/StaticDateTimePicker/StaticDateTimePicker.js +10 -0
  28. package/StaticTimePicker/StaticTimePicker.d.ts +10 -0
  29. package/StaticTimePicker/StaticTimePicker.js +10 -0
  30. package/TimeField/TimeField.d.ts +10 -0
  31. package/TimeField/TimeField.js +10 -0
  32. package/TimePicker/TimePicker.d.ts +10 -0
  33. package/TimePicker/TimePicker.js +10 -0
  34. package/YearCalendar/PickersYear.js +1 -1
  35. package/YearCalendar/YearCalendar.js +6 -3
  36. package/dateTimeViewRenderers/dateTimeViewRenderers.d.ts +2 -1
  37. package/dateTimeViewRenderers/dateTimeViewRenderers.js +52 -33
  38. package/index.js +1 -1
  39. package/internals/components/FakeTextField/FakeTextField.d.ts +7 -0
  40. package/internals/components/FakeTextField/FakeTextField.js +19 -0
  41. package/internals/components/FakeTextField/index.d.ts +1 -0
  42. package/internals/components/FakeTextField/index.js +1 -0
  43. package/internals/constants/dimensions.d.ts +2 -1
  44. package/internals/constants/dimensions.js +2 -1
  45. package/internals/hooks/useField/useField.js +6 -4
  46. package/internals/hooks/useField/useField.types.d.ts +6 -0
  47. package/internals/utils/date-time-utils.d.ts +11 -0
  48. package/internals/utils/date-time-utils.js +32 -2
  49. package/legacy/AdapterDayjs/AdapterDayjs.js +6 -4
  50. package/legacy/AdapterMoment/AdapterMoment.js +2 -5
  51. package/legacy/DateCalendar/DateCalendar.js +3 -1
  52. package/legacy/DateCalendar/DayCalendar.js +2 -2
  53. package/legacy/DateCalendar/PickersFadeTransitionGroup.js +6 -6
  54. package/legacy/DateCalendar/PickersSlideTransition.js +5 -5
  55. package/legacy/DateField/DateField.js +10 -0
  56. package/legacy/DateTimeField/DateTimeField.js +10 -0
  57. package/legacy/DateTimePicker/DateTimePicker.js +15 -0
  58. package/legacy/DesktopDateTimePicker/DesktopDateTimePicker.js +24 -8
  59. package/legacy/DesktopTimePicker/DesktopTimePicker.js +19 -10
  60. package/legacy/DigitalClock/DigitalClock.js +1 -1
  61. package/legacy/MobileDateTimePicker/MobileDateTimePicker.js +10 -0
  62. package/legacy/MobileTimePicker/MobileTimePicker.js +10 -0
  63. package/legacy/MonthCalendar/MonthCalendar.js +4 -1
  64. package/legacy/StaticDateTimePicker/StaticDateTimePicker.js +10 -0
  65. package/legacy/StaticTimePicker/StaticTimePicker.js +10 -0
  66. package/legacy/TimeField/TimeField.js +10 -0
  67. package/legacy/TimePicker/TimePicker.js +10 -0
  68. package/legacy/YearCalendar/PickersYear.js +1 -1
  69. package/legacy/YearCalendar/YearCalendar.js +6 -4
  70. package/legacy/dateTimeViewRenderers/dateTimeViewRenderers.js +51 -33
  71. package/legacy/index.js +1 -1
  72. package/legacy/internals/components/FakeTextField/FakeTextField.js +19 -0
  73. package/legacy/internals/components/FakeTextField/index.js +1 -0
  74. package/legacy/internals/constants/dimensions.js +2 -1
  75. package/legacy/internals/hooks/useField/useField.js +5 -3
  76. package/legacy/internals/utils/date-time-utils.js +34 -2
  77. package/legacy/locales/esES.js +1 -1
  78. package/locales/esES.js +1 -1
  79. package/modern/AdapterDayjs/AdapterDayjs.js +6 -4
  80. package/modern/AdapterMoment/AdapterMoment.js +2 -5
  81. package/modern/DateCalendar/DateCalendar.js +3 -1
  82. package/modern/DateCalendar/DayCalendar.js +2 -2
  83. package/modern/DateCalendar/PickersFadeTransitionGroup.js +6 -6
  84. package/modern/DateCalendar/PickersSlideTransition.js +5 -5
  85. package/modern/DateField/DateField.js +10 -0
  86. package/modern/DateTimeField/DateTimeField.js +10 -0
  87. package/modern/DateTimePicker/DateTimePicker.js +15 -0
  88. package/modern/DesktopDateTimePicker/DesktopDateTimePicker.js +25 -7
  89. package/modern/DesktopTimePicker/DesktopTimePicker.js +17 -8
  90. package/modern/DigitalClock/DigitalClock.js +1 -1
  91. package/modern/MobileDateTimePicker/MobileDateTimePicker.js +10 -0
  92. package/modern/MobileTimePicker/MobileTimePicker.js +10 -0
  93. package/modern/MonthCalendar/MonthCalendar.js +4 -1
  94. package/modern/StaticDateTimePicker/StaticDateTimePicker.js +10 -0
  95. package/modern/StaticTimePicker/StaticTimePicker.js +10 -0
  96. package/modern/TimeField/TimeField.js +10 -0
  97. package/modern/TimePicker/TimePicker.js +10 -0
  98. package/modern/YearCalendar/PickersYear.js +1 -1
  99. package/modern/YearCalendar/YearCalendar.js +5 -3
  100. package/modern/dateTimeViewRenderers/dateTimeViewRenderers.js +52 -33
  101. package/modern/index.js +1 -1
  102. package/modern/internals/components/FakeTextField/FakeTextField.js +19 -0
  103. package/modern/internals/components/FakeTextField/index.js +1 -0
  104. package/modern/internals/constants/dimensions.js +2 -1
  105. package/modern/internals/hooks/useField/useField.js +6 -4
  106. package/modern/internals/utils/date-time-utils.js +29 -2
  107. package/modern/locales/esES.js +1 -1
  108. package/node/AdapterDayjs/AdapterDayjs.js +6 -4
  109. package/node/AdapterMoment/AdapterMoment.js +2 -5
  110. package/node/DateCalendar/DateCalendar.js +4 -3
  111. package/node/DateCalendar/DayCalendar.js +2 -2
  112. package/node/DateCalendar/PickersFadeTransitionGroup.js +6 -6
  113. package/node/DateCalendar/PickersSlideTransition.js +5 -7
  114. package/node/DateCalendar/dateCalendarClasses.js +1 -2
  115. package/node/DateCalendar/dayCalendarClasses.js +1 -2
  116. package/node/DateCalendar/pickersFadeTransitionGroupClasses.js +1 -2
  117. package/node/DateCalendar/pickersSlideTransitionClasses.js +1 -2
  118. package/node/DateField/DateField.js +11 -2
  119. package/node/DatePicker/DatePicker.js +1 -2
  120. package/node/DatePicker/DatePickerToolbar.js +1 -2
  121. package/node/DatePicker/datePickerToolbarClasses.js +1 -2
  122. package/node/DateTimeField/DateTimeField.js +11 -2
  123. package/node/DateTimePicker/DateTimePicker.js +16 -2
  124. package/node/DateTimePicker/DateTimePickerTabs.js +1 -2
  125. package/node/DateTimePicker/dateTimePickerTabsClasses.js +1 -2
  126. package/node/DateTimePicker/dateTimePickerToolbarClasses.js +1 -2
  127. package/node/DayCalendarSkeleton/dayCalendarSkeletonClasses.js +1 -2
  128. package/node/DesktopDatePicker/DesktopDatePicker.js +1 -2
  129. package/node/DesktopDateTimePicker/DesktopDateTimePicker.js +25 -8
  130. package/node/DesktopTimePicker/DesktopTimePicker.js +18 -10
  131. package/node/DigitalClock/DigitalClock.js +2 -3
  132. package/node/DigitalClock/digitalClockClasses.js +1 -2
  133. package/node/LocalizationProvider/LocalizationProvider.js +2 -4
  134. package/node/MobileDatePicker/MobileDatePicker.js +1 -2
  135. package/node/MobileDateTimePicker/MobileDateTimePicker.js +11 -2
  136. package/node/MobileTimePicker/MobileTimePicker.js +11 -2
  137. package/node/MonthCalendar/MonthCalendar.js +5 -3
  138. package/node/MonthCalendar/PickersMonth.js +2 -3
  139. package/node/MonthCalendar/monthCalendarClasses.js +1 -2
  140. package/node/MonthCalendar/pickersMonthClasses.js +1 -2
  141. package/node/MultiSectionDigitalClock/MultiSectionDigitalClock.js +1 -2
  142. package/node/MultiSectionDigitalClock/MultiSectionDigitalClockSection.js +2 -3
  143. package/node/MultiSectionDigitalClock/multiSectionDigitalClockClasses.js +1 -2
  144. package/node/MultiSectionDigitalClock/multiSectionDigitalClockSectionClasses.js +1 -2
  145. package/node/PickersCalendarHeader/PickersCalendarHeader.js +1 -2
  146. package/node/PickersCalendarHeader/pickersCalendarHeaderClasses.js +1 -2
  147. package/node/PickersDay/PickersDay.js +1 -2
  148. package/node/PickersDay/pickersDayClasses.js +1 -2
  149. package/node/PickersLayout/PickersLayout.js +3 -6
  150. package/node/PickersLayout/pickersLayoutClasses.js +1 -2
  151. package/node/PickersLayout/usePickerLayout.js +1 -2
  152. package/node/StaticDatePicker/StaticDatePicker.js +1 -2
  153. package/node/StaticDateTimePicker/StaticDateTimePicker.js +11 -2
  154. package/node/StaticTimePicker/StaticTimePicker.js +11 -2
  155. package/node/TimeClock/TimeClock.js +1 -2
  156. package/node/TimeClock/clockClasses.js +1 -2
  157. package/node/TimeClock/clockNumberClasses.js +1 -2
  158. package/node/TimeClock/clockPointerClasses.js +1 -2
  159. package/node/TimeClock/shared.js +2 -4
  160. package/node/TimeClock/timeClockClasses.js +1 -2
  161. package/node/TimeField/TimeField.js +11 -2
  162. package/node/TimePicker/TimePicker.js +11 -2
  163. package/node/TimePicker/timePickerToolbarClasses.js +1 -2
  164. package/node/YearCalendar/PickersYear.js +3 -4
  165. package/node/YearCalendar/YearCalendar.js +6 -5
  166. package/node/YearCalendar/pickersYearClasses.js +1 -2
  167. package/node/YearCalendar/yearCalendarClasses.js +1 -2
  168. package/node/dateTimeViewRenderers/dateTimeViewRenderers.js +51 -32
  169. package/node/icons/index.js +9 -17
  170. package/node/index.js +1 -1
  171. package/node/internals/components/DateTimeViewWrapper/DateTimeViewWrapper.js +2 -3
  172. package/node/internals/components/FakeTextField/FakeTextField.js +27 -0
  173. package/node/internals/components/FakeTextField/index.js +12 -0
  174. package/node/internals/components/PickerViewRoot/PickerViewRoot.js +2 -3
  175. package/node/internals/components/PickersArrowSwitcher/PickersArrowSwitcher.js +2 -3
  176. package/node/internals/components/PickersArrowSwitcher/pickersArrowSwitcherClasses.js +1 -2
  177. package/node/internals/components/PickersToolbar.js +2 -3
  178. package/node/internals/components/PickersToolbarButton.js +2 -3
  179. package/node/internals/components/PickersToolbarText.js +2 -3
  180. package/node/internals/components/pickersPopperClasses.js +1 -2
  181. package/node/internals/components/pickersToolbarButtonClasses.js +1 -2
  182. package/node/internals/components/pickersToolbarClasses.js +1 -2
  183. package/node/internals/components/pickersToolbarTextClasses.js +1 -2
  184. package/node/internals/constants/dimensions.js +8 -13
  185. package/node/internals/hooks/useDefaultReduceAnimations.js +1 -2
  186. package/node/internals/hooks/useField/useField.js +6 -4
  187. package/node/internals/utils/date-time-utils.js +29 -1
  188. package/node/internals/utils/getDefaultReferenceDate.js +1 -2
  189. package/node/internals/utils/utils.js +1 -2
  190. package/node/internals/utils/validation/extractValidationProps.js +3 -6
  191. package/node/internals/utils/valueManagers.js +3 -5
  192. package/node/locales/beBY.js +1 -2
  193. package/node/locales/caES.js +1 -2
  194. package/node/locales/csCZ.js +1 -2
  195. package/node/locales/daDK.js +1 -2
  196. package/node/locales/deDE.js +1 -2
  197. package/node/locales/elGR.js +1 -2
  198. package/node/locales/enUS.js +2 -4
  199. package/node/locales/esES.js +2 -3
  200. package/node/locales/faIR.js +1 -2
  201. package/node/locales/fiFI.js +1 -2
  202. package/node/locales/frFR.js +1 -2
  203. package/node/locales/heIL.js +1 -2
  204. package/node/locales/huHU.js +1 -2
  205. package/node/locales/isIS.js +1 -2
  206. package/node/locales/itIT.js +1 -2
  207. package/node/locales/jaJP.js +1 -2
  208. package/node/locales/koKR.js +1 -2
  209. package/node/locales/kzKZ.js +1 -2
  210. package/node/locales/nbNO.js +1 -2
  211. package/node/locales/nlNL.js +1 -2
  212. package/node/locales/plPL.js +1 -2
  213. package/node/locales/ptBR.js +1 -2
  214. package/node/locales/roRO.js +1 -2
  215. package/node/locales/ruRU.js +1 -2
  216. package/node/locales/skSK.js +1 -2
  217. package/node/locales/svSE.js +1 -2
  218. package/node/locales/trTR.js +1 -2
  219. package/node/locales/ukUA.js +1 -2
  220. package/node/locales/urPK.js +1 -2
  221. package/node/locales/viVN.js +1 -2
  222. package/node/locales/zhCN.js +1 -2
  223. package/node/locales/zhHK.js +1 -2
  224. package/package.json +5 -5
@@ -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
  var _defaultizedProps$amp, _defaultizedProps$slo2, _defaultizedProps$slo3, _props$localeText$ope, _props$localeText;
18
28
  const localeText = useLocaleText();
@@ -3,5 +3,15 @@ import { MobileTimePickerProps } from './MobileTimePicker.types';
3
3
  type MobileTimePickerComponent = (<TDate>(props: MobileTimePickerProps<TDate> & React.RefAttributes<HTMLDivElement>) => React.JSX.Element) & {
4
4
  propTypes?: any;
5
5
  };
6
+ /**
7
+ * Demos:
8
+ *
9
+ * - [TimePicker](https://mui.com/x/react-date-pickers/time-picker/)
10
+ * - [Validation](https://mui.com/x/react-date-pickers/validation/)
11
+ *
12
+ * API:
13
+ *
14
+ * - [MobileTimePicker API](https://mui.com/x/api/date-pickers/mobile-time-picker/)
15
+ */
6
16
  declare const MobileTimePicker: MobileTimePickerComponent;
7
17
  export { MobileTimePicker };
@@ -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
  var _defaultizedProps$amp, _defaultizedProps$slo2, _props$localeText$ope, _props$localeText;
17
27
  const localeText = useLocaleText();
@@ -14,6 +14,7 @@ import { applyDefaultDate, getMonthsInYear } from '../internals/utils/date-utils
14
14
  import { singleItemValueManager } from '../internals/utils/valueManagers';
15
15
  import { SECTION_TYPE_GRANULARITY } from '../internals/utils/getDefaultReferenceDate';
16
16
  import { useControlledValueWithTimezone } from '../internals/hooks/useValueWithTimezone';
17
+ import { DIALOG_WIDTH } from '../internals/constants/dimensions';
17
18
  import { jsx as _jsx } from "react/jsx-runtime";
18
19
  const useUtilityClasses = ownerState => {
19
20
  const {
@@ -48,7 +49,9 @@ const MonthCalendarRoot = styled('div', {
48
49
  flexWrap: 'wrap',
49
50
  alignContent: 'stretch',
50
51
  padding: '0 4px',
51
- width: 320
52
+ width: DIALOG_WIDTH,
53
+ // avoid padding increasing width over defined
54
+ boxSizing: 'border-box'
52
55
  });
53
56
  export const MonthCalendar = /*#__PURE__*/React.forwardRef(function MonthCalendar(inProps, ref) {
54
57
  const props = useMonthCalendarDefaultizedProps(inProps, 'MuiMonthCalendar');
@@ -3,5 +3,15 @@ import { StaticDateTimePickerProps } from './StaticDateTimePicker.types';
3
3
  type StaticDateTimePickerComponent = (<TDate>(props: StaticDateTimePickerProps<TDate> & React.RefAttributes<HTMLDivElement>) => React.JSX.Element) & {
4
4
  propTypes?: any;
5
5
  };
6
+ /**
7
+ * Demos:
8
+ *
9
+ * - [DateTimePicker](https://mui.com/x/react-date-pickers/date-time-picker/)
10
+ * - [Validation](https://mui.com/x/react-date-pickers/validation/)
11
+ *
12
+ * API:
13
+ *
14
+ * - [StaticDateTimePicker API](https://mui.com/x/api/date-pickers/static-date-time-picker/)
15
+ */
6
16
  declare const StaticDateTimePicker: StaticDateTimePickerComponent;
7
17
  export { StaticDateTimePicker };
@@ -7,6 +7,16 @@ import { renderDateViewCalendar } from '../dateViewRenderers';
7
7
  import { singleItemValueManager } from '../internals/utils/valueManagers';
8
8
  import { useStaticPicker } from '../internals/hooks/useStaticPicker';
9
9
  import { validateDateTime } from '../internals/utils/validation/validateDateTime';
10
+ /**
11
+ * Demos:
12
+ *
13
+ * - [DateTimePicker](https://mui.com/x/react-date-pickers/date-time-picker/)
14
+ * - [Validation](https://mui.com/x/react-date-pickers/validation/)
15
+ *
16
+ * API:
17
+ *
18
+ * - [StaticDateTimePicker API](https://mui.com/x/api/date-pickers/static-date-time-picker/)
19
+ */
10
20
  const StaticDateTimePicker = /*#__PURE__*/React.forwardRef(function StaticDateTimePicker(inProps, ref) {
11
21
  var _defaultizedProps$dis, _defaultizedProps$amp, _defaultizedProps$yea, _defaultizedProps$slo, _defaultizedProps$slo2;
12
22
  const defaultizedProps = useDateTimePickerDefaultizedProps(inProps, 'MuiStaticDateTimePicker');
@@ -3,5 +3,15 @@ import { StaticTimePickerProps } from './StaticTimePicker.types';
3
3
  type StaticTimePickerComponent = (<TDate>(props: StaticTimePickerProps<TDate> & React.RefAttributes<HTMLDivElement>) => React.JSX.Element) & {
4
4
  propTypes?: any;
5
5
  };
6
+ /**
7
+ * Demos:
8
+ *
9
+ * - [TimePicker](https://mui.com/x/react-date-pickers/time-picker/)
10
+ * - [Validation](https://mui.com/x/react-date-pickers/validation/)
11
+ *
12
+ * API:
13
+ *
14
+ * - [StaticTimePicker API](https://mui.com/x/api/date-pickers/static-time-picker/)
15
+ */
6
16
  declare const StaticTimePicker: StaticTimePickerComponent;
7
17
  export { StaticTimePicker };
@@ -6,6 +6,16 @@ import { renderTimeViewClock } from '../timeViewRenderers';
6
6
  import { singleItemValueManager } from '../internals/utils/valueManagers';
7
7
  import { useStaticPicker } from '../internals/hooks/useStaticPicker';
8
8
  import { validateTime } from '../internals/utils/validation/validateTime';
9
+ /**
10
+ * Demos:
11
+ *
12
+ * - [TimePicker](https://mui.com/x/react-date-pickers/time-picker/)
13
+ * - [Validation](https://mui.com/x/react-date-pickers/validation/)
14
+ *
15
+ * API:
16
+ *
17
+ * - [StaticTimePicker API](https://mui.com/x/api/date-pickers/static-time-picker/)
18
+ */
9
19
  const StaticTimePicker = /*#__PURE__*/React.forwardRef(function StaticTimePicker(inProps, ref) {
10
20
  var _defaultizedProps$dis, _defaultizedProps$amp, _defaultizedProps$slo;
11
21
  const defaultizedProps = useTimePickerDefaultizedProps(inProps, 'MuiStaticTimePicker');
@@ -3,5 +3,15 @@ import { TimeFieldProps } from './TimeField.types';
3
3
  type TimeFieldComponent = (<TDate>(props: TimeFieldProps<TDate> & React.RefAttributes<HTMLDivElement>) => React.JSX.Element) & {
4
4
  propTypes?: any;
5
5
  };
6
+ /**
7
+ * Demos:
8
+ *
9
+ * - [TimeField](http://mui.com/x/react-date-pickers/time-field/)
10
+ * - [Fields](https://mui.com/x/react-date-pickers/fields/)
11
+ *
12
+ * API:
13
+ *
14
+ * - [TimeField API](https://mui.com/x/api/date-pickers/time-field/)
15
+ */
6
16
  declare const TimeField: TimeFieldComponent;
7
17
  export { TimeField };
@@ -12,6 +12,16 @@ import { refType } from '@mui/utils';
12
12
  import { useTimeField } from './useTimeField';
13
13
  import { useClearableField } from '../hooks';
14
14
  import { jsx as _jsx } from "react/jsx-runtime";
15
+ /**
16
+ * Demos:
17
+ *
18
+ * - [TimeField](http://mui.com/x/react-date-pickers/time-field/)
19
+ * - [Fields](https://mui.com/x/react-date-pickers/fields/)
20
+ *
21
+ * API:
22
+ *
23
+ * - [TimeField API](https://mui.com/x/api/date-pickers/time-field/)
24
+ */
15
25
  const TimeField = /*#__PURE__*/React.forwardRef(function TimeField(inProps, ref) {
16
26
  var _ref, _slots$textField, _slotProps$textField;
17
27
  const themeProps = useThemeProps({
@@ -3,5 +3,15 @@ import { TimePickerProps } from './TimePicker.types';
3
3
  type TimePickerComponent = (<TDate>(props: TimePickerProps<TDate> & React.RefAttributes<HTMLDivElement>) => React.JSX.Element) & {
4
4
  propTypes?: any;
5
5
  };
6
+ /**
7
+ * Demos:
8
+ *
9
+ * - [TimePicker](https://mui.com/x/react-date-pickers/time-picker/)
10
+ * - [Validation](https://mui.com/x/react-date-pickers/validation/)
11
+ *
12
+ * API:
13
+ *
14
+ * - [TimePicker API](https://mui.com/x/api/date-pickers/time-picker/)
15
+ */
6
16
  declare const TimePicker: TimePickerComponent;
7
17
  export { TimePicker };
@@ -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,
@@ -47,7 +47,7 @@ const PickersYearButton = styled('button', {
47
47
  border: 0,
48
48
  outline: 0
49
49
  }, theme.typography.subtitle1, {
50
- margin: '8px 0',
50
+ margin: '6px 0',
51
51
  height: 36,
52
52
  width: 72,
53
53
  borderRadius: 18,
@@ -14,6 +14,7 @@ import { applyDefaultDate } from '../internals/utils/date-utils';
14
14
  import { singleItemValueManager } from '../internals/utils/valueManagers';
15
15
  import { SECTION_TYPE_GRANULARITY } from '../internals/utils/getDefaultReferenceDate';
16
16
  import { useControlledValueWithTimezone } from '../internals/hooks/useValueWithTimezone';
17
+ import { DIALOG_WIDTH, MAX_CALENDAR_HEIGHT } from '../internals/constants/dimensions';
17
18
  import { jsx as _jsx } from "react/jsx-runtime";
18
19
  const useUtilityClasses = ownerState => {
19
20
  const {
@@ -25,6 +26,7 @@ const useUtilityClasses = ownerState => {
25
26
  return composeClasses(slots, getYearCalendarUtilityClass, classes);
26
27
  };
27
28
  function useYearCalendarDefaultizedProps(props, name) {
29
+ var _themeProps$yearsPerR;
28
30
  const utils = useUtils();
29
31
  const defaultDates = useDefaultDates();
30
32
  const themeProps = useThemeProps({
@@ -35,6 +37,7 @@ function useYearCalendarDefaultizedProps(props, name) {
35
37
  disablePast: false,
36
38
  disableFuture: false
37
39
  }, themeProps, {
40
+ yearsPerRow: (_themeProps$yearsPerR = themeProps.yearsPerRow) != null ? _themeProps$yearsPerR : 3,
38
41
  minDate: applyDefaultDate(utils, themeProps.minDate, defaultDates.minDate),
39
42
  maxDate: applyDefaultDate(utils, themeProps.maxDate, defaultDates.maxDate)
40
43
  });
@@ -50,8 +53,8 @@ const YearCalendarRoot = styled('div', {
50
53
  overflowY: 'auto',
51
54
  height: '100%',
52
55
  padding: '0 4px',
53
- width: 320,
54
- maxHeight: 304,
56
+ width: DIALOG_WIDTH,
57
+ maxHeight: MAX_CALENDAR_HEIGHT,
55
58
  // avoid padding increasing width over defined
56
59
  boxSizing: 'border-box',
57
60
  position: 'relative'
@@ -76,7 +79,7 @@ export const YearCalendar = /*#__PURE__*/React.forwardRef(function YearCalendar(
76
79
  onYearFocus,
77
80
  hasFocus,
78
81
  onFocusedViewChange,
79
- yearsPerRow = 3,
82
+ yearsPerRow,
80
83
  timezone: timezoneProp,
81
84
  gridLabelId
82
85
  } = props,
@@ -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.0
2
+ * @mui/x-date-pickers v6.16.2
3
3
  *
4
4
  * @license MIT
5
5
  * This source code is licensed under the MIT license found in the
@@ -0,0 +1,7 @@
1
+ import * as React from 'react';
2
+ import { FieldSection } from '../../../models';
3
+ interface FakeTextFieldProps {
4
+ sections: FieldSection[];
5
+ }
6
+ export declare function FakeTextField(props: FakeTextFieldProps): React.JSX.Element;
7
+ export {};
@@ -0,0 +1,19 @@
1
+ import * as React from 'react';
2
+ import Stack from '@mui/material/Stack';
3
+ import { jsx as _jsx } from "react/jsx-runtime";
4
+ import { jsxs as _jsxs } from "react/jsx-runtime";
5
+ export function FakeTextField(props) {
6
+ const {
7
+ sections
8
+ } = props;
9
+ return /*#__PURE__*/_jsx(Stack, {
10
+ direction: "row",
11
+ spacing: 1,
12
+ children: sections.map(section => /*#__PURE__*/_jsxs(React.Fragment, {
13
+ children: [section.startSeparator, /*#__PURE__*/_jsx("input", {
14
+ value: section.value,
15
+ onChange: () => {}
16
+ }), section.endSeparator]
17
+ }))
18
+ });
19
+ }
@@ -0,0 +1 @@
1
+ export { FakeTextField } from './FakeTextField';
@@ -0,0 +1 @@
1
+ export { FakeTextField } from './FakeTextField';
@@ -1,6 +1,7 @@
1
1
  export declare const DAY_SIZE = 36;
2
2
  export declare const DAY_MARGIN = 2;
3
3
  export declare const DIALOG_WIDTH = 320;
4
- export declare const VIEW_HEIGHT = 358;
4
+ export declare const MAX_CALENDAR_HEIGHT = 280;
5
+ export declare const VIEW_HEIGHT = 334;
5
6
  export declare const DIGITAL_CLOCK_VIEW_HEIGHT = 232;
6
7
  export declare const MULTI_SECTION_CLOCK_SECTION_WIDTH = 48;
@@ -1,6 +1,7 @@
1
1
  export const DAY_SIZE = 36;
2
2
  export const DAY_MARGIN = 2;
3
3
  export const DIALOG_WIDTH = 320;
4
- export const VIEW_HEIGHT = 358;
4
+ export const MAX_CALENDAR_HEIGHT = 280;
5
+ export const VIEW_HEIGHT = 334;
5
6
  export const DIGITAL_CLOCK_VIEW_HEIGHT = 232;
6
7
  export const MULTI_SECTION_CLOCK_SECTION_WIDTH = 48;
@@ -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 = ["onClick", "onKeyDown", "onFocus", "onBlur", "onMouseUp", "onPaste", "error", "clearable", "onClear"];
3
+ const _excluded = ["onClick", "onKeyDown", "onFocus", "onBlur", "onMouseUp", "onPaste", "error", "clearable", "onClear", "disabled"];
4
4
  import * as React from 'react';
5
5
  import useEnhancedEffect from '@mui/utils/useEnhancedEffect';
6
6
  import useEventCallback from '@mui/utils/useEventCallback';
@@ -44,7 +44,8 @@ export const useField = params => {
44
44
  onPaste,
45
45
  error,
46
46
  clearable,
47
- onClear
47
+ onClear,
48
+ disabled
48
49
  },
49
50
  fieldValueManager,
50
51
  valueManager,
@@ -407,7 +408,8 @@ export const useField = params => {
407
408
  });
408
409
  return _extends({
409
410
  placeholder,
410
- autoComplete: 'off'
411
+ autoComplete: 'off',
412
+ disabled: Boolean(disabled)
411
413
  }, otherForwardedProps, {
412
414
  value: shouldShowPlaceholder ? '' : valueStr,
413
415
  inputMode,
@@ -422,6 +424,6 @@ export const useField = params => {
422
424
  onClear: handleClearValue,
423
425
  error: inputError,
424
426
  ref: handleRef,
425
- clearable: Boolean(clearable && !areAllSectionsEmpty && !readOnly)
427
+ clearable: Boolean(clearable && !areAllSectionsEmpty && !readOnly && !disabled)
426
428
  });
427
429
  };
@@ -105,6 +105,11 @@ export interface UseFieldInternalProps<TValue, TDate, TSection extends FieldSect
105
105
  * @default false
106
106
  */
107
107
  clearable?: boolean;
108
+ /**
109
+ * If `true`, the component is disabled.
110
+ * @default false
111
+ */
112
+ disabled?: boolean;
108
113
  }
109
114
  export interface FieldRef<TSection extends FieldSection> {
110
115
  /**
@@ -134,6 +139,7 @@ export interface UseFieldForwardedProps {
134
139
  error?: boolean;
135
140
  onClear?: React.MouseEventHandler;
136
141
  clearable?: boolean;
142
+ disabled?: boolean;
137
143
  }
138
144
  export type UseFieldResponse<TForwardedProps extends UseFieldForwardedProps> = Omit<TForwardedProps, keyof UseFieldForwardedProps> & Required<UseFieldForwardedProps> & Pick<React.HTMLAttributes<HTMLInputElement>, 'autoCorrect' | 'inputMode' | 'placeholder'> & {
139
145
  ref: React.Ref<HTMLInputElement>;
@@ -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;
@@ -21,6 +21,7 @@ import { useDefaultReduceAnimations } from '../internals/hooks/useDefaultReduceA
21
21
  import { getDateCalendarUtilityClass } from './dateCalendarClasses';
22
22
  import { useControlledValueWithTimezone } from '../internals/hooks/useValueWithTimezone';
23
23
  import { singleItemValueManager } from '../internals/utils/valueManagers';
24
+ import { VIEW_HEIGHT } from '../internals/constants/dimensions';
24
25
  import { jsx as _jsx } from "react/jsx-runtime";
25
26
  import { jsxs as _jsxs } from "react/jsx-runtime";
26
27
  var useUtilityClasses = function useUtilityClasses(ownerState) {
@@ -64,7 +65,8 @@ var DateCalendarRoot = styled(PickerViewRoot, {
64
65
  }
65
66
  })({
66
67
  display: 'flex',
67
- flexDirection: 'column'
68
+ flexDirection: 'column',
69
+ height: VIEW_HEIGHT
68
70
  });
69
71
  var DateCalendarViewTransitionContainer = styled(PickersFadeTransitionGroup, {
70
72
  name: 'MuiDateCalendar',