@mui/x-date-pickers 6.1.0 → 6.2.1

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 (198) hide show
  1. package/AdapterDayjs/AdapterDayjs.d.ts +114 -0
  2. package/AdapterDayjs/AdapterDayjs.js +387 -0
  3. package/AdapterDayjs/index.d.ts +1 -28
  4. package/AdapterDayjs/index.js +1 -102
  5. package/CHANGELOG.md +101 -1
  6. package/DateCalendar/DateCalendar.types.d.ts +1 -1
  7. package/DateCalendar/DayCalendar.d.ts +1 -1
  8. package/DateField/DateField.js +6 -0
  9. package/DateField/useDateField.js +3 -1
  10. package/DatePicker/DatePicker.js +6 -0
  11. package/DateTimeField/DateTimeField.js +6 -0
  12. package/DateTimeField/useDateTimeField.js +3 -1
  13. package/DateTimePicker/DateTimePicker.js +6 -0
  14. package/DateTimePicker/shared.js +3 -1
  15. package/DesktopDatePicker/DesktopDatePicker.js +7 -0
  16. package/DesktopDateTimePicker/DesktopDateTimePicker.js +7 -0
  17. package/DesktopTimePicker/DesktopTimePicker.js +7 -0
  18. package/LocalizationProvider/LocalizationProvider.d.ts +1 -1
  19. package/LocalizationProvider/LocalizationProvider.js +1 -1
  20. package/MobileDatePicker/MobileDatePicker.js +7 -0
  21. package/MobileDateTimePicker/MobileDateTimePicker.js +7 -0
  22. package/MobileTimePicker/MobileTimePicker.js +7 -0
  23. package/README.md +1 -0
  24. package/StaticDatePicker/StaticDatePicker.js +1 -0
  25. package/StaticDateTimePicker/StaticDateTimePicker.js +3 -2
  26. package/StaticTimePicker/StaticTimePicker.js +3 -2
  27. package/TimeClock/TimeClock.types.d.ts +1 -1
  28. package/TimeField/TimeField.js +6 -0
  29. package/TimeField/useTimeField.js +3 -1
  30. package/TimePicker/TimePicker.js +6 -0
  31. package/index.js +1 -1
  32. package/internals/components/PickersModalDialog.d.ts +1 -1
  33. package/internals/components/PickersPopper.d.ts +1 -1
  34. package/internals/hooks/useDesktopPicker/useDesktopPicker.d.ts +1 -1
  35. package/internals/hooks/useDesktopPicker/useDesktopPicker.js +15 -14
  36. package/internals/hooks/useDesktopPicker/useDesktopPicker.types.d.ts +2 -2
  37. package/internals/hooks/useField/useField.types.d.ts +7 -2
  38. package/internals/hooks/useField/useField.utils.d.ts +3 -3
  39. package/internals/hooks/useField/useField.utils.js +16 -4
  40. package/internals/hooks/useField/useFieldState.js +4 -3
  41. package/internals/hooks/useMobilePicker/useMobilePicker.d.ts +1 -1
  42. package/internals/hooks/useMobilePicker/useMobilePicker.js +12 -10
  43. package/internals/hooks/useMobilePicker/useMobilePicker.types.d.ts +2 -2
  44. package/internals/hooks/usePicker/index.d.ts +1 -1
  45. package/internals/hooks/usePicker/usePicker.d.ts +1 -1
  46. package/internals/hooks/usePicker/usePicker.js +2 -0
  47. package/internals/hooks/usePicker/usePicker.types.d.ts +2 -2
  48. package/internals/hooks/usePicker/usePickerLayoutProps.d.ts +1 -1
  49. package/internals/hooks/usePicker/usePickerValue.d.ts +4 -180
  50. package/internals/hooks/usePicker/usePickerValue.js +191 -159
  51. package/internals/hooks/usePicker/usePickerValue.types.d.ts +235 -0
  52. package/internals/hooks/usePicker/usePickerValue.types.js +1 -0
  53. package/internals/hooks/usePicker/usePickerViews.d.ts +1 -1
  54. package/internals/hooks/useStaticPicker/useStaticPicker.d.ts +1 -1
  55. package/internals/hooks/useStaticPicker/useStaticPicker.js +10 -10
  56. package/internals/hooks/useStaticPicker/useStaticPicker.types.d.ts +1 -1
  57. package/internals/index.d.ts +1 -1
  58. package/internals/models/props/basePickerProps.d.ts +6 -0
  59. package/internals/utils/valueManagers.js +1 -1
  60. package/legacy/AdapterDayjs/AdapterDayjs.js +403 -0
  61. package/legacy/AdapterDayjs/index.js +1 -119
  62. package/legacy/DateField/DateField.js +6 -0
  63. package/legacy/DateField/useDateField.js +3 -1
  64. package/legacy/DatePicker/DatePicker.js +6 -0
  65. package/legacy/DateTimeField/DateTimeField.js +6 -0
  66. package/legacy/DateTimeField/useDateTimeField.js +3 -1
  67. package/legacy/DateTimePicker/DateTimePicker.js +6 -0
  68. package/legacy/DateTimePicker/shared.js +3 -1
  69. package/legacy/DesktopDatePicker/DesktopDatePicker.js +7 -0
  70. package/legacy/DesktopDateTimePicker/DesktopDateTimePicker.js +7 -0
  71. package/legacy/DesktopTimePicker/DesktopTimePicker.js +7 -0
  72. package/legacy/LocalizationProvider/LocalizationProvider.js +1 -1
  73. package/legacy/MobileDatePicker/MobileDatePicker.js +7 -0
  74. package/legacy/MobileDateTimePicker/MobileDateTimePicker.js +7 -0
  75. package/legacy/MobileTimePicker/MobileTimePicker.js +7 -0
  76. package/legacy/StaticDatePicker/StaticDatePicker.js +1 -0
  77. package/legacy/StaticDateTimePicker/StaticDateTimePicker.js +3 -2
  78. package/legacy/StaticTimePicker/StaticTimePicker.js +3 -2
  79. package/legacy/TimeField/TimeField.js +6 -0
  80. package/legacy/TimeField/useTimeField.js +3 -1
  81. package/legacy/TimePicker/TimePicker.js +6 -0
  82. package/legacy/index.js +1 -1
  83. package/legacy/internals/hooks/useDesktopPicker/useDesktopPicker.js +10 -10
  84. package/legacy/internals/hooks/useField/useField.utils.js +24 -9
  85. package/legacy/internals/hooks/useField/useFieldState.js +6 -4
  86. package/legacy/internals/hooks/useMobilePicker/useMobilePicker.js +7 -6
  87. package/legacy/internals/hooks/usePicker/usePicker.js +2 -0
  88. package/legacy/internals/hooks/usePicker/usePickerValue.js +186 -159
  89. package/legacy/internals/hooks/usePicker/usePickerValue.types.js +1 -0
  90. package/legacy/internals/hooks/useStaticPicker/useStaticPicker.js +7 -8
  91. package/legacy/internals/utils/valueManagers.js +2 -2
  92. package/legacy/tests/describeGregorianAdapter/describeGregorianAdapter.js +20 -0
  93. package/legacy/tests/describeGregorianAdapter/describeGregorianAdapter.types.js +1 -0
  94. package/legacy/tests/describeGregorianAdapter/index.js +1 -0
  95. package/legacy/tests/describeGregorianAdapter/testCalculations.js +273 -0
  96. package/legacy/tests/describeGregorianAdapter/testFormat.js +26 -0
  97. package/legacy/tests/describeGregorianAdapter/testLocalization.js +15 -0
  98. package/legacy/tests/describeValidation/describeValidation.js +2 -1
  99. package/legacy/tests/describeValidation/testMinutesViewValidation.js +201 -0
  100. package/legacy/tests/describeValue/testPickerActionBar.js +52 -3
  101. package/legacy/tests/describeValue/testPickerOpenCloseLifeCycle.js +6 -6
  102. package/models/adapters.d.ts +21 -20
  103. package/models/fields.d.ts +1 -0
  104. package/modern/AdapterDayjs/AdapterDayjs.js +386 -0
  105. package/modern/AdapterDayjs/index.js +1 -101
  106. package/modern/DateField/DateField.js +6 -0
  107. package/modern/DateField/useDateField.js +3 -1
  108. package/modern/DatePicker/DatePicker.js +6 -0
  109. package/modern/DateTimeField/DateTimeField.js +6 -0
  110. package/modern/DateTimeField/useDateTimeField.js +3 -1
  111. package/modern/DateTimePicker/DateTimePicker.js +6 -0
  112. package/modern/DateTimePicker/shared.js +3 -1
  113. package/modern/DesktopDatePicker/DesktopDatePicker.js +7 -0
  114. package/modern/DesktopDateTimePicker/DesktopDateTimePicker.js +7 -0
  115. package/modern/DesktopTimePicker/DesktopTimePicker.js +7 -0
  116. package/modern/LocalizationProvider/LocalizationProvider.js +1 -1
  117. package/modern/MobileDatePicker/MobileDatePicker.js +7 -0
  118. package/modern/MobileDateTimePicker/MobileDateTimePicker.js +7 -0
  119. package/modern/MobileTimePicker/MobileTimePicker.js +7 -0
  120. package/modern/StaticDatePicker/StaticDatePicker.js +1 -0
  121. package/modern/StaticDateTimePicker/StaticDateTimePicker.js +3 -2
  122. package/modern/StaticTimePicker/StaticTimePicker.js +3 -2
  123. package/modern/TimeField/TimeField.js +6 -0
  124. package/modern/TimeField/useTimeField.js +3 -1
  125. package/modern/TimePicker/TimePicker.js +6 -0
  126. package/modern/index.js +1 -1
  127. package/modern/internals/hooks/useDesktopPicker/useDesktopPicker.js +15 -14
  128. package/modern/internals/hooks/useField/useField.utils.js +16 -4
  129. package/modern/internals/hooks/useField/useFieldState.js +4 -3
  130. package/modern/internals/hooks/useMobilePicker/useMobilePicker.js +12 -10
  131. package/modern/internals/hooks/usePicker/usePicker.js +2 -0
  132. package/modern/internals/hooks/usePicker/usePickerValue.js +191 -159
  133. package/modern/internals/hooks/usePicker/usePickerValue.types.js +1 -0
  134. package/modern/internals/hooks/useStaticPicker/useStaticPicker.js +10 -10
  135. package/modern/internals/utils/valueManagers.js +1 -1
  136. package/modern/tests/describeGregorianAdapter/describeGregorianAdapter.js +20 -0
  137. package/modern/tests/describeGregorianAdapter/describeGregorianAdapter.types.js +1 -0
  138. package/modern/tests/describeGregorianAdapter/index.js +1 -0
  139. package/modern/tests/describeGregorianAdapter/testCalculations.js +272 -0
  140. package/modern/tests/describeGregorianAdapter/testFormat.js +27 -0
  141. package/modern/tests/describeGregorianAdapter/testLocalization.js +16 -0
  142. package/modern/tests/describeValidation/describeValidation.js +2 -1
  143. package/modern/tests/describeValidation/testMinutesViewValidation.js +200 -0
  144. package/modern/tests/describeValue/testPickerActionBar.js +52 -3
  145. package/modern/tests/describeValue/testPickerOpenCloseLifeCycle.js +6 -6
  146. package/node/AdapterDayjs/AdapterDayjs.js +395 -0
  147. package/node/AdapterDayjs/index.js +6 -104
  148. package/node/DateField/DateField.js +6 -0
  149. package/node/DateField/useDateField.js +3 -1
  150. package/node/DatePicker/DatePicker.js +6 -0
  151. package/node/DateTimeField/DateTimeField.js +6 -0
  152. package/node/DateTimeField/useDateTimeField.js +3 -1
  153. package/node/DateTimePicker/DateTimePicker.js +6 -0
  154. package/node/DateTimePicker/shared.js +3 -1
  155. package/node/DesktopDatePicker/DesktopDatePicker.js +7 -0
  156. package/node/DesktopDateTimePicker/DesktopDateTimePicker.js +7 -0
  157. package/node/DesktopTimePicker/DesktopTimePicker.js +7 -0
  158. package/node/LocalizationProvider/LocalizationProvider.js +1 -1
  159. package/node/MobileDatePicker/MobileDatePicker.js +7 -0
  160. package/node/MobileDateTimePicker/MobileDateTimePicker.js +7 -0
  161. package/node/MobileTimePicker/MobileTimePicker.js +7 -0
  162. package/node/StaticDatePicker/StaticDatePicker.js +1 -0
  163. package/node/StaticDateTimePicker/StaticDateTimePicker.js +3 -2
  164. package/node/StaticTimePicker/StaticTimePicker.js +3 -2
  165. package/node/TimeField/TimeField.js +6 -0
  166. package/node/TimeField/useTimeField.js +3 -1
  167. package/node/TimePicker/TimePicker.js +6 -0
  168. package/node/index.js +1 -1
  169. package/node/internals/hooks/useDesktopPicker/useDesktopPicker.js +15 -14
  170. package/node/internals/hooks/useField/useField.utils.js +16 -4
  171. package/node/internals/hooks/useField/useFieldState.js +4 -3
  172. package/node/internals/hooks/useMobilePicker/useMobilePicker.js +12 -10
  173. package/node/internals/hooks/usePicker/usePicker.js +2 -0
  174. package/node/internals/hooks/usePicker/usePickerValue.js +191 -158
  175. package/node/internals/hooks/usePicker/usePickerValue.types.js +5 -0
  176. package/node/internals/hooks/useStaticPicker/useStaticPicker.js +10 -10
  177. package/node/internals/utils/valueManagers.js +1 -1
  178. package/node/tests/describeGregorianAdapter/describeGregorianAdapter.js +29 -0
  179. package/node/tests/describeGregorianAdapter/describeGregorianAdapter.types.js +5 -0
  180. package/node/tests/describeGregorianAdapter/index.js +18 -0
  181. package/node/tests/describeGregorianAdapter/testCalculations.js +279 -0
  182. package/node/tests/describeGregorianAdapter/testFormat.js +34 -0
  183. package/node/tests/describeGregorianAdapter/testLocalization.js +23 -0
  184. package/node/tests/describeValidation/describeValidation.js +2 -1
  185. package/node/tests/describeValidation/testMinutesViewValidation.js +210 -0
  186. package/node/tests/describeValue/testPickerActionBar.js +52 -3
  187. package/node/tests/describeValue/testPickerOpenCloseLifeCycle.js +6 -6
  188. package/package.json +9 -9
  189. package/tests/describeGregorianAdapter/describeGregorianAdapter.js +20 -0
  190. package/tests/describeGregorianAdapter/describeGregorianAdapter.types.js +1 -0
  191. package/tests/describeGregorianAdapter/index.js +1 -0
  192. package/tests/describeGregorianAdapter/testCalculations.js +272 -0
  193. package/tests/describeGregorianAdapter/testFormat.js +27 -0
  194. package/tests/describeGregorianAdapter/testLocalization.js +16 -0
  195. package/tests/describeValidation/describeValidation.js +2 -1
  196. package/tests/describeValidation/testMinutesViewValidation.js +200 -0
  197. package/tests/describeValue/testPickerActionBar.js +52 -3
  198. package/tests/describeValue/testPickerOpenCloseLifeCycle.js +6 -6
package/CHANGELOG.md CHANGED
@@ -3,9 +3,109 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## 6.2.1
7
+
8
+ _Apr 20, 2023_
9
+
10
+ We'd like to offer a big thanks to the 9 contributors who made this release possible. Here are some highlights ✨:
11
+
12
+ - 🚀 Add virtualization to row detail panels (#7969) @yaredtsy
13
+ - 🐞 Bugfixes
14
+ - 📚 Documentation improvements
15
+
16
+ ### `@mui/x-data-grid@v6.2.1` / `@mui/x-data-grid-pro@v6.2.1` / `@mui/x-data-grid-premium@v6.2.1`
17
+
18
+ #### Changes
19
+
20
+ - [DataGrid] Add `getTogglableColumns` to `Hide all` and `Show all` actions (#8496) @MBilalShafi
21
+ - [DataGrid] Add Grid + Joy UI experiment page (#8067) @cherniavskii
22
+ - [DataGrid] Fix print style when rendering inside Shadow DOM (#8656) @Bwatermelon
23
+ - [DataGrid] Replace `GridAutoSizer` with `ResizeObserver` (#8091) @m4theushw
24
+ - [DataGrid] Use stable ID for the placeholder filter item (#8603) @m4theushw
25
+ - [DataGridPro] Virtualize row detail panels (#7969) @yaredtsy
26
+
27
+ ### `@mui/x-date-pickers@v6.2.1` / `@mui/x-date-pickers-pro@v6.2.1`
28
+
29
+ #### Changes
30
+
31
+ - [pickers] Do not include the time in date components when going to today (#8657) @flaviendelangle
32
+ - [pickers] Sync internal state with controlled value (#8674) @alexfauquette
33
+
34
+ ### `@mui/x-codemod@v6.0.6`
35
+
36
+ #### Changes
37
+
38
+ - [codemod] Avoid filter failures on object prototype properties (#8647) @LukasTy
39
+
40
+ ### Docs
41
+
42
+ - [docs] Add no-op service worker to fix stale cache issue (#8598) @cherniavskii
43
+ - [docs] Clarify what `AdapterDayjs` is in the Getting Started page (#8219) @flaviendelangle
44
+ - [docs] Fix typo on picker page description (#8611) @maxolasersquad
45
+ - [docs] Improve section title in Getting Started page (#8648) @flaviendelangle
46
+ - [docs] Inform about input format modification (#8458) @alexfauquette
47
+
48
+ ### Core
49
+
50
+ - [core] Fix release date (#8618) @flaviendelangle
51
+ - [core] Upgrade monorepo (#8668) @MBilalShafi
52
+ - [charts] Support Tooltip (#8356) @alexfauquette
53
+
54
+ ## 6.2.0
55
+
56
+ _Apr 14, 2023_
57
+
58
+ We'd like to offer a big thanks to the 8 contributors who made this release possible. Here are some highlights ✨:
59
+
60
+ - Add `@mui/base` as a `peerDependency` of `@mui/x-date-pickers` and `@mui/x-date-pickers-pro` (#8590) @LukasTy
61
+
62
+ Both libraries were not working correctly if used without `@mui/base`.
63
+ Most package manager should automatically use the `@mui/base` version installed for `@mui/material`.
64
+
65
+ - The value rendered in the picker or field input no longer has spaces around the `/` characters (#8425) @flaviendelangle
66
+
67
+ You can use the `formatDensity='spacious'` prop to add it back.
68
+ More information on [the dedicated doc section](https://mui.com/x/react-date-pickers/custom-field/#change-the-format-density)
69
+
70
+ - 🌍 Improve French (fr-FR) and Urdu (ur-PK) and locales.
71
+ - 🐞 Bugfixes
72
+ - 📚 Documentation improvements
73
+
74
+ ### `@mui/x-data-grid@v6.2.0` / `@mui/x-data-grid-pro@v6.2.0` / `@mui/x-data-grid-premium@v6.2.0`
75
+
76
+ #### Changes
77
+
78
+ - [DataGrid] Reset selection state on `checkboxSelection` toggle (#8522) @MBilalShafi
79
+ - [DataGrid] Use `baseSelect` slot instead of `baseTextField` with `select={true}` (#8110) @cherniavskii
80
+ - [l10n] Improve French (fr-FR) locale (#8537) @vallereaugabriel
81
+ - [l10n] Improve Urdu (ur-PK) locale (#8513) @SFARPak
82
+
83
+ ### `@mui/x-date-pickers@v6.2.0` / `@mui/x-date-pickers-pro@v6.2.0`
84
+
85
+ #### Changes
86
+
87
+ - [DateTimePicker] Fix `TimeClock` validation ignoring date by default (#8570) @LukasTy
88
+ - [fields] Fix reliance on section order (#8545) @LukasTy
89
+ - [fields] Make the space between format separators controllable (#8425) @flaviendelangle
90
+ - [pickers] Add `@mui/base` to `peerDependencies` (#8590) @LukasTy
91
+ - [pickers] Fix JSDoc for `formatDensity` prop (#8601) @flaviendelangle
92
+ - [pickers] Improve value lifecycle on non-controlled pickers (#8312) @flaviendelangle
93
+ - [pickers] Migrate `AdapterDayjs` to our repository (#8487) @flaviendelangle
94
+
95
+ ### Docs
96
+
97
+ - [docs] Fix "Custom day rendering" demo alignment (#8541) @LukasTy
98
+ - [docs] Fix **below** typo (#8576) @alexfauquette
99
+
100
+ ### Core
101
+
102
+ - [core] Optimize `renovate` rules (#8575) @LukasTy
103
+ - [core] Upgrade monorepo (#8578) @cherniavskii
104
+ - [core] Update last release date (#8569) @DanailH
105
+
6
106
  ## 6.1.0
7
107
 
8
- _Apr 7, 2023_
108
+ _Apr 10, 2023_
9
109
 
10
110
  We'd like to offer a big thanks to the 15 contributors who made this release possible. Here are some highlights ✨:
11
111
 
@@ -5,7 +5,7 @@ import { PickersCalendarHeaderSlotsComponent, PickersCalendarHeaderSlotsComponen
5
5
  import { DayCalendarSlotsComponent, DayCalendarSlotsComponentsProps, ExportedDayCalendarProps } from './DayCalendar';
6
6
  import { DateCalendarClasses } from './dateCalendarClasses';
7
7
  import { BaseDateValidationProps, YearValidationProps, MonthValidationProps, DayValidationProps } from '../internals/hooks/validation/models';
8
- import { PickerSelectionState } from '../internals/hooks/usePicker/usePickerValue';
8
+ import { PickerSelectionState } from '../internals/hooks/usePicker/usePickerValue.types';
9
9
  import { ExportedUseViewsOptions } from '../internals/hooks/useViews';
10
10
  import { DateView } from '../models';
11
11
  import { DefaultizedProps } from '../internals/models/helpers';
@@ -1,5 +1,5 @@
1
1
  import * as React from 'react';
2
- import { SlotComponentProps } from '@mui/base';
2
+ import { SlotComponentProps } from '@mui/base/utils';
3
3
  import { PickersDay, PickersDayProps, ExportedPickersDayProps } from '../PickersDay/PickersDay';
4
4
  import { PickerOnChangeFn } from '../internals/hooks/useViews';
5
5
  import { SlideDirection, SlideTransitionProps } from './PickersSlideTransition';
@@ -120,6 +120,12 @@ process.env.NODE_ENV !== "production" ? DateField.propTypes = {
120
120
  * Format of the date when rendered in the input(s).
121
121
  */
122
122
  format: PropTypes.string,
123
+ /**
124
+ * Density of the format when rendered in the input.
125
+ * Setting `formatDensity` to `"spacious"` will add a space before and after each `/`, `-` and `.` character.
126
+ * @default "dense"
127
+ */
128
+ formatDensity: PropTypes.oneOf(['dense', 'spacious']),
123
129
  /**
124
130
  * Props applied to the [`FormHelperText`](/material-ui/api/form-helper-text/) element.
125
131
  */
@@ -1,6 +1,6 @@
1
1
  import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
2
2
  import _extends from "@babel/runtime/helpers/esm/extends";
3
- const _excluded = ["value", "defaultValue", "format", "onChange", "readOnly", "onError", "shouldDisableDate", "shouldDisableMonth", "shouldDisableYear", "minDate", "maxDate", "disableFuture", "disablePast", "selectedSections", "onSelectedSectionsChange", "unstableFieldRef"];
3
+ const _excluded = ["value", "defaultValue", "format", "formatDensity", "onChange", "readOnly", "onError", "shouldDisableDate", "shouldDisableMonth", "shouldDisableYear", "minDate", "maxDate", "disableFuture", "disablePast", "selectedSections", "onSelectedSectionsChange", "unstableFieldRef"];
4
4
  import { singleItemFieldValueManager, singleItemValueManager } from '../internals/utils/valueManagers';
5
5
  import { useField } from '../internals/hooks/useField';
6
6
  import { validateDate } from '../internals/hooks/validation/useDateValidation';
@@ -27,6 +27,7 @@ export const useDateField = ({
27
27
  value,
28
28
  defaultValue,
29
29
  format,
30
+ formatDensity,
30
31
  onChange,
31
32
  readOnly,
32
33
  onError,
@@ -49,6 +50,7 @@ export const useDateField = ({
49
50
  value,
50
51
  defaultValue,
51
52
  format,
53
+ formatDensity,
52
54
  onChange,
53
55
  readOnly,
54
56
  onError,
@@ -127,6 +127,12 @@ process.env.NODE_ENV !== "production" ? DatePicker.propTypes = {
127
127
  * Defaults to localized format based on the used `views`.
128
128
  */
129
129
  format: PropTypes.string,
130
+ /**
131
+ * Density of the format when rendered in the input.
132
+ * Setting `formatDensity` to `"spacious"` will add a space before and after each `/`, `-` and `.` character.
133
+ * @default "dense"
134
+ */
135
+ formatDensity: PropTypes.oneOf(['dense', 'spacious']),
130
136
  /**
131
137
  * Pass a ref to the `input` element.
132
138
  */
@@ -130,6 +130,12 @@ process.env.NODE_ENV !== "production" ? DateTimeField.propTypes = {
130
130
  * Format of the date when rendered in the input(s).
131
131
  */
132
132
  format: PropTypes.string,
133
+ /**
134
+ * Density of the format when rendered in the input.
135
+ * Setting `formatDensity` to `"spacious"` will add a space before and after each `/`, `-` and `.` character.
136
+ * @default "dense"
137
+ */
138
+ formatDensity: PropTypes.oneOf(['dense', 'spacious']),
133
139
  /**
134
140
  * Props applied to the [`FormHelperText`](/material-ui/api/form-helper-text/) element.
135
141
  */
@@ -1,6 +1,6 @@
1
1
  import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
2
2
  import _extends from "@babel/runtime/helpers/esm/extends";
3
- const _excluded = ["value", "defaultValue", "format", "onChange", "readOnly", "onError", "shouldDisableDate", "shouldDisableMonth", "shouldDisableYear", "minDate", "maxDate", "disableFuture", "disablePast", "minTime", "maxTime", "minDateTime", "maxDateTime", "minutesStep", "disableIgnoringDatePartForTimeValidation", "shouldDisableClock", "shouldDisableTime", "selectedSections", "onSelectedSectionsChange", "ampm", "unstableFieldRef"];
3
+ const _excluded = ["value", "defaultValue", "format", "formatDensity", "onChange", "readOnly", "onError", "shouldDisableDate", "shouldDisableMonth", "shouldDisableYear", "minDate", "maxDate", "disableFuture", "disablePast", "minTime", "maxTime", "minDateTime", "maxDateTime", "minutesStep", "disableIgnoringDatePartForTimeValidation", "shouldDisableClock", "shouldDisableTime", "selectedSections", "onSelectedSectionsChange", "ampm", "unstableFieldRef"];
4
4
  import { singleItemFieldValueManager, singleItemValueManager } from '../internals/utils/valueManagers';
5
5
  import { useField } from '../internals/hooks/useField';
6
6
  import { validateDateTime } from '../internals/hooks/validation/useDateTimeValidation';
@@ -32,6 +32,7 @@ export const useDateTimeField = ({
32
32
  value,
33
33
  defaultValue,
34
34
  format,
35
+ formatDensity,
35
36
  onChange,
36
37
  readOnly,
37
38
  onError,
@@ -61,6 +62,7 @@ export const useDateTimeField = ({
61
62
  value,
62
63
  defaultValue,
63
64
  format,
65
+ formatDensity,
64
66
  onChange,
65
67
  readOnly,
66
68
  onError,
@@ -142,6 +142,12 @@ process.env.NODE_ENV !== "production" ? DateTimePicker.propTypes = {
142
142
  * Defaults to localized format based on the used `views`.
143
143
  */
144
144
  format: PropTypes.string,
145
+ /**
146
+ * Density of the format when rendered in the input.
147
+ * Setting `formatDensity` to `"spacious"` will add a space before and after each `/`, `-` and `.` character.
148
+ * @default "dense"
149
+ */
150
+ formatDensity: PropTypes.oneOf(['dense', 'spacious']),
145
151
  /**
146
152
  * Pass a ref to the `input` element.
147
153
  */
@@ -37,7 +37,9 @@ export function useDateTimePickerDefaultizedProps(props, name) {
37
37
  localeText,
38
38
  orientation: (_themeProps$orientati = themeProps.orientation) != null ? _themeProps$orientati : 'portrait',
39
39
  // TODO: Remove from public API
40
- disableIgnoringDatePartForTimeValidation: (_themeProps$disableIg = themeProps.disableIgnoringDatePartForTimeValidation) != null ? _themeProps$disableIg : Boolean(themeProps.minDateTime || themeProps.maxDateTime),
40
+ disableIgnoringDatePartForTimeValidation: (_themeProps$disableIg = themeProps.disableIgnoringDatePartForTimeValidation) != null ? _themeProps$disableIg : Boolean(themeProps.minDateTime || themeProps.maxDateTime ||
41
+ // allow time clock to correctly check time validity: https://github.com/mui/mui-x/issues/8520
42
+ themeProps.disablePast || themeProps.disableFuture),
41
43
  disableFuture: (_themeProps$disableFu = themeProps.disableFuture) != null ? _themeProps$disableFu : false,
42
44
  disablePast: (_themeProps$disablePa = themeProps.disablePast) != null ? _themeProps$disablePa : false,
43
45
  minDate: applyDefaultDate(utils, (_themeProps$minDateTi = themeProps.minDateTime) != null ? _themeProps$minDateTi : themeProps.minDate, defaultDates.minDate),
@@ -49,6 +49,7 @@ const DesktopDatePicker = /*#__PURE__*/React.forwardRef(function DesktopDatePick
49
49
  } = useDesktopPicker({
50
50
  props,
51
51
  valueManager: singleItemValueManager,
52
+ valueType: 'date',
52
53
  getOpenDialogAriaText: localeText.openDatePickerDialogue,
53
54
  validator: validateDate
54
55
  });
@@ -143,6 +144,12 @@ DesktopDatePicker.propTypes = {
143
144
  * Defaults to localized format based on the used `views`.
144
145
  */
145
146
  format: PropTypes.string,
147
+ /**
148
+ * Density of the format when rendered in the input.
149
+ * Setting `formatDensity` to `"spacious"` will add a space before and after each `/`, `-` and `.` character.
150
+ * @default "dense"
151
+ */
152
+ formatDensity: PropTypes.oneOf(['dense', 'spacious']),
146
153
  /**
147
154
  * Pass a ref to the `input` element.
148
155
  */
@@ -57,6 +57,7 @@ const DesktopDateTimePicker = /*#__PURE__*/React.forwardRef(function DesktopDate
57
57
  } = useDesktopPicker({
58
58
  props,
59
59
  valueManager: singleItemValueManager,
60
+ valueType: 'date-time',
60
61
  getOpenDialogAriaText: localeText.openDatePickerDialogue,
61
62
  validator: validateDateTime
62
63
  });
@@ -166,6 +167,12 @@ DesktopDateTimePicker.propTypes = {
166
167
  * Defaults to localized format based on the used `views`.
167
168
  */
168
169
  format: PropTypes.string,
170
+ /**
171
+ * Density of the format when rendered in the input.
172
+ * Setting `formatDensity` to `"spacious"` will add a space before and after each `/`, `-` and `.` character.
173
+ * @default "dense"
174
+ */
175
+ formatDensity: PropTypes.oneOf(['dense', 'spacious']),
169
176
  /**
170
177
  * Pass a ref to the `input` element.
171
178
  */
@@ -49,6 +49,7 @@ const DesktopTimePicker = /*#__PURE__*/React.forwardRef(function DesktopTimePick
49
49
  } = useDesktopPicker({
50
50
  props,
51
51
  valueManager: singleItemValueManager,
52
+ valueType: 'time',
52
53
  getOpenDialogAriaText: localeText.openTimePickerDialogue,
53
54
  validator: validateTime
54
55
  });
@@ -132,6 +133,12 @@ DesktopTimePicker.propTypes = {
132
133
  * Defaults to localized format based on the used `views`.
133
134
  */
134
135
  format: PropTypes.string,
136
+ /**
137
+ * Density of the format when rendered in the input.
138
+ * Setting `formatDensity` to `"spacious"` will add a space before and after each `/`, `-` and `.` character.
139
+ * @default "dense"
140
+ */
141
+ formatDensity: PropTypes.oneOf(['dense', 'spacious']),
135
142
  /**
136
143
  * Pass a ref to the `input` element.
137
144
  */
@@ -17,7 +17,7 @@ export interface LocalizationProviderProps<TDate> {
17
17
  children?: React.ReactNode;
18
18
  /**
19
19
  * Date library adapter class function.
20
- * @see See the localization provider {@link https://mui.com/x/react-date-pickers/getting-started/#code-setup code setup section} for more details.
20
+ * @see See the localization provider {@link https://mui.com/x/react-date-pickers/getting-started/#setup-your-date-library-adapter date adapter setup section} for more details.
21
21
  */
22
22
  dateAdapter?: new (...args: any) => MuiPickersAdapter<TDate>;
23
23
  /** Formats that are used for any child pickers */
@@ -90,7 +90,7 @@ process.env.NODE_ENV !== "production" ? LocalizationProvider.propTypes = {
90
90
  children: PropTypes.node,
91
91
  /**
92
92
  * Date library adapter class function.
93
- * @see See the localization provider {@link https://mui.com/x/react-date-pickers/getting-started/#code-setup code setup section} for more details.
93
+ * @see See the localization provider {@link https://mui.com/x/react-date-pickers/getting-started/#setup-your-date-library-adapter date adapter setup section} for more details.
94
94
  */
95
95
  dateAdapter: PropTypes.func,
96
96
  /**
@@ -46,6 +46,7 @@ const MobileDatePicker = /*#__PURE__*/React.forwardRef(function MobileDatePicker
46
46
  } = useMobilePicker({
47
47
  props,
48
48
  valueManager: singleItemValueManager,
49
+ valueType: 'date',
49
50
  getOpenDialogAriaText: localeText.openDatePickerDialogue,
50
51
  validator: validateDate
51
52
  });
@@ -140,6 +141,12 @@ MobileDatePicker.propTypes = {
140
141
  * Defaults to localized format based on the used `views`.
141
142
  */
142
143
  format: PropTypes.string,
144
+ /**
145
+ * Density of the format when rendered in the input.
146
+ * Setting `formatDensity` to `"spacious"` will add a space before and after each `/`, `-` and `.` character.
147
+ * @default "dense"
148
+ */
149
+ formatDensity: PropTypes.oneOf(['dense', 'spacious']),
143
150
  /**
144
151
  * Pass a ref to the `input` element.
145
152
  */
@@ -55,6 +55,7 @@ const MobileDateTimePicker = /*#__PURE__*/React.forwardRef(function MobileDateTi
55
55
  } = useMobilePicker({
56
56
  props,
57
57
  valueManager: singleItemValueManager,
58
+ valueType: 'date-time',
58
59
  getOpenDialogAriaText: localeText.openDatePickerDialogue,
59
60
  validator: validateDateTime
60
61
  });
@@ -164,6 +165,12 @@ MobileDateTimePicker.propTypes = {
164
165
  * Defaults to localized format based on the used `views`.
165
166
  */
166
167
  format: PropTypes.string,
168
+ /**
169
+ * Density of the format when rendered in the input.
170
+ * Setting `formatDensity` to `"spacious"` will add a space before and after each `/`, `-` and `.` character.
171
+ * @default "dense"
172
+ */
173
+ formatDensity: PropTypes.oneOf(['dense', 'spacious']),
167
174
  /**
168
175
  * Pass a ref to the `input` element.
169
176
  */
@@ -48,6 +48,7 @@ const MobileTimePicker = /*#__PURE__*/React.forwardRef(function MobileTimePicker
48
48
  } = useMobilePicker({
49
49
  props,
50
50
  valueManager: singleItemValueManager,
51
+ valueType: 'time',
51
52
  getOpenDialogAriaText: localeText.openTimePickerDialogue,
52
53
  validator: validateTime
53
54
  });
@@ -131,6 +132,12 @@ MobileTimePicker.propTypes = {
131
132
  * Defaults to localized format based on the used `views`.
132
133
  */
133
134
  format: PropTypes.string,
135
+ /**
136
+ * Density of the format when rendered in the input.
137
+ * Setting `formatDensity` to `"spacious"` will add a space before and after each `/`, `-` and `.` character.
138
+ * @default "dense"
139
+ */
140
+ formatDensity: PropTypes.oneOf(['dense', 'spacious']),
134
141
  /**
135
142
  * Pass a ref to the `input` element.
136
143
  */
package/README.md CHANGED
@@ -34,6 +34,7 @@ This component has the following peer dependencies that you will need to install
34
34
 
35
35
  ```json
36
36
  "peerDependencies": {
37
+ "@mui/base": "^5.0.0-alpha.87",
37
38
  "@mui/material": "^5.8.6",
38
39
  "@mui/system": "^5.8.0",
39
40
  "react": "^17.0.2 || ^18.0.0",
@@ -32,6 +32,7 @@ const StaticDatePicker = /*#__PURE__*/React.forwardRef(function StaticDatePicker
32
32
  } = useStaticPicker({
33
33
  props,
34
34
  valueManager: singleItemValueManager,
35
+ valueType: 'date',
35
36
  validator: validateDate,
36
37
  ref
37
38
  });
@@ -42,8 +42,9 @@ const StaticDateTimePicker = /*#__PURE__*/React.forwardRef(function StaticDateTi
42
42
  } = useStaticPicker({
43
43
  props,
44
44
  valueManager: singleItemValueManager,
45
- ref,
46
- validator: validateDateTime
45
+ valueType: 'date-time',
46
+ validator: validateDateTime,
47
+ ref
47
48
  });
48
49
  return renderPicker();
49
50
  });
@@ -34,8 +34,9 @@ const StaticTimePicker = /*#__PURE__*/React.forwardRef(function StaticTimePicker
34
34
  } = useStaticPicker({
35
35
  props,
36
36
  valueManager: singleItemValueManager,
37
- ref,
38
- validator: validateTime
37
+ valueType: 'time',
38
+ validator: validateTime,
39
+ ref
39
40
  });
40
41
  return renderPicker();
41
42
  });
@@ -4,7 +4,7 @@ import { TimeClockClasses } from './timeClockClasses';
4
4
  import { TimeValidationProps, BaseTimeValidationProps } from '../internals/hooks/validation/models';
5
5
  import { PickersArrowSwitcherSlotsComponent, PickersArrowSwitcherSlotsComponentsProps } from '../internals/components/PickersArrowSwitcher';
6
6
  import { TimeView } from '../models';
7
- import { PickerSelectionState } from '../internals/hooks/usePicker/usePickerValue';
7
+ import { PickerSelectionState } from '../internals/hooks/usePicker/usePickerValue.types';
8
8
  import { UncapitalizeObjectKeys } from '../internals/utils/slots-migration';
9
9
  export interface ExportedTimeClockProps<TDate> extends TimeValidationProps<TDate>, BaseTimeValidationProps {
10
10
  /**
@@ -130,6 +130,12 @@ process.env.NODE_ENV !== "production" ? TimeField.propTypes = {
130
130
  * Format of the date when rendered in the input(s).
131
131
  */
132
132
  format: PropTypes.string,
133
+ /**
134
+ * Density of the format when rendered in the input.
135
+ * Setting `formatDensity` to `"spacious"` will add a space before and after each `/`, `-` and `.` character.
136
+ * @default "dense"
137
+ */
138
+ formatDensity: PropTypes.oneOf(['dense', 'spacious']),
133
139
  /**
134
140
  * Props applied to the [`FormHelperText`](/material-ui/api/form-helper-text/) element.
135
141
  */
@@ -1,6 +1,6 @@
1
1
  import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
2
2
  import _extends from "@babel/runtime/helpers/esm/extends";
3
- const _excluded = ["value", "defaultValue", "format", "onChange", "readOnly", "onError", "disableFuture", "disablePast", "minTime", "maxTime", "minutesStep", "shouldDisableClock", "shouldDisableTime", "disableIgnoringDatePartForTimeValidation", "selectedSections", "onSelectedSectionsChange", "ampm", "unstableFieldRef"];
3
+ const _excluded = ["value", "defaultValue", "format", "formatDensity", "onChange", "readOnly", "onError", "disableFuture", "disablePast", "minTime", "maxTime", "minutesStep", "shouldDisableClock", "shouldDisableTime", "disableIgnoringDatePartForTimeValidation", "selectedSections", "onSelectedSectionsChange", "ampm", "unstableFieldRef"];
4
4
  import { singleItemFieldValueManager, singleItemValueManager } from '../internals/utils/valueManagers';
5
5
  import { useField } from '../internals/hooks/useField';
6
6
  import { validateTime } from '../internals/hooks/validation/useTimeValidation';
@@ -25,6 +25,7 @@ export const useTimeField = ({
25
25
  value,
26
26
  defaultValue,
27
27
  format,
28
+ formatDensity,
28
29
  onChange,
29
30
  readOnly,
30
31
  onError,
@@ -49,6 +50,7 @@ export const useTimeField = ({
49
50
  value,
50
51
  defaultValue,
51
52
  format,
53
+ formatDensity,
52
54
  onChange,
53
55
  readOnly,
54
56
  onError,
@@ -116,6 +116,12 @@ process.env.NODE_ENV !== "production" ? TimePicker.propTypes = {
116
116
  * Defaults to localized format based on the used `views`.
117
117
  */
118
118
  format: PropTypes.string,
119
+ /**
120
+ * Density of the format when rendered in the input.
121
+ * Setting `formatDensity` to `"spacious"` will add a space before and after each `/`, `-` and `.` character.
122
+ * @default "dense"
123
+ */
124
+ formatDensity: PropTypes.oneOf(['dense', 'spacious']),
119
125
  /**
120
126
  * Pass a ref to the `input` element.
121
127
  */
package/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @mui/x-date-pickers v6.1.0
2
+ * @mui/x-date-pickers v6.2.1
3
3
  *
4
4
  * @license MIT
5
5
  * This source code is licensed under the MIT license found in the
@@ -3,7 +3,7 @@ import { DialogProps as MuiDialogProps } from '@mui/material/Dialog';
3
3
  import { PaperProps as MuiPaperProps } from '@mui/material/Paper/Paper';
4
4
  import { TransitionProps as MuiTransitionProps } from '@mui/material/transitions/transition';
5
5
  import { UncapitalizeObjectKeys } from '../utils/slots-migration';
6
- import { UsePickerValueActions } from '../hooks/usePicker/usePickerValue';
6
+ import { UsePickerValueActions } from '../hooks/usePicker/usePickerValue.types';
7
7
  export interface PickersModalDialogSlotsComponent {
8
8
  /**
9
9
  * Custom component for the dialog inside which the views are rendered on mobile.
@@ -6,7 +6,7 @@ import { TrapFocusProps as MuiTrapFocusProps } from '@mui/material/Unstable_Trap
6
6
  import { TransitionProps as MuiTransitionProps } from '@mui/material/transitions';
7
7
  import { PickersPopperClasses } from './pickersPopperClasses';
8
8
  import { UncapitalizeObjectKeys } from '../utils/slots-migration';
9
- import { UsePickerValueActions } from '../hooks/usePicker/usePickerValue';
9
+ import { UsePickerValueActions } from '../hooks/usePicker/usePickerValue.types';
10
10
  export interface PickersPopperSlotsComponent {
11
11
  /**
12
12
  * Custom component for the paper rendered inside the desktop picker's Popper.
@@ -7,6 +7,6 @@ import { DateOrTimeView } from '../../../models';
7
7
  * - DesktopDateTimePicker
8
8
  * - DesktopTimePicker
9
9
  */
10
- export declare const useDesktopPicker: <TDate, TView extends DateOrTimeView, TExternalProps extends UseDesktopPickerProps<TDate, TView, any, TExternalProps>>({ props, valueManager, getOpenDialogAriaText, validator, }: UseDesktopPickerParams<TDate, TView, TExternalProps>) => {
10
+ export declare const useDesktopPicker: <TDate, TView extends DateOrTimeView, TExternalProps extends UseDesktopPickerProps<TDate, TView, any, TExternalProps>>({ props, getOpenDialogAriaText, ...pickerParams }: UseDesktopPickerParams<TDate, TView, TExternalProps>) => {
11
11
  renderPicker: () => JSX.Element;
12
12
  };
@@ -1,7 +1,8 @@
1
1
  import _extends from "@babel/runtime/helpers/esm/extends";
2
2
  import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
3
- const _excluded = ["ownerState"],
4
- _excluded2 = ["ownerState"];
3
+ const _excluded = ["props", "getOpenDialogAriaText"],
4
+ _excluded2 = ["ownerState"],
5
+ _excluded3 = ["ownerState"];
5
6
  import * as React from 'react';
6
7
  import { useSlotProps } from '@mui/base/utils';
7
8
  import MuiInputAdornment from '@mui/material/InputAdornment';
@@ -21,19 +22,20 @@ import { jsxs as _jsxs } from "react/jsx-runtime";
21
22
  * - DesktopDateTimePicker
22
23
  * - DesktopTimePicker
23
24
  */
24
- export const useDesktopPicker = ({
25
- props,
26
- valueManager,
27
- getOpenDialogAriaText,
28
- validator
29
- }) => {
25
+ export const useDesktopPicker = _ref => {
30
26
  var _innerSlotProps$toolb, _innerSlotProps$toolb2, _slots$inputAdornment, _slots$openPickerButt, _slots$layout;
27
+ let {
28
+ props,
29
+ getOpenDialogAriaText
30
+ } = _ref,
31
+ pickerParams = _objectWithoutPropertiesLoose(_ref, _excluded);
31
32
  const {
32
33
  slots,
33
34
  slotProps: innerSlotProps,
34
35
  className,
35
36
  sx,
36
37
  format,
38
+ formatDensity,
37
39
  label,
38
40
  inputRef,
39
41
  readOnly,
@@ -54,15 +56,13 @@ export const useDesktopPicker = ({
54
56
  renderCurrentView,
55
57
  shouldRestoreFocus,
56
58
  fieldProps: pickerFieldProps
57
- } = usePicker({
59
+ } = usePicker(_extends({}, pickerParams, {
58
60
  props,
59
61
  inputRef: internalInputRef,
60
- valueManager,
61
- validator,
62
62
  autoFocusView: true,
63
63
  additionalViewProps: {},
64
64
  wrapperVariant: 'desktop'
65
- });
65
+ }));
66
66
  const InputAdornment = (_slots$inputAdornment = slots.inputAdornment) != null ? _slots$inputAdornment : MuiInputAdornment;
67
67
  const _useSlotProps = useSlotProps({
68
68
  elementType: InputAdornment,
@@ -72,7 +72,7 @@ export const useDesktopPicker = ({
72
72
  },
73
73
  ownerState: props
74
74
  }),
75
- inputAdornmentProps = _objectWithoutPropertiesLoose(_useSlotProps, _excluded);
75
+ inputAdornmentProps = _objectWithoutPropertiesLoose(_useSlotProps, _excluded2);
76
76
  const OpenPickerButton = (_slots$openPickerButt = slots.openPickerButton) != null ? _slots$openPickerButt : IconButton;
77
77
  const _useSlotProps2 = useSlotProps({
78
78
  elementType: OpenPickerButton,
@@ -85,7 +85,7 @@ export const useDesktopPicker = ({
85
85
  },
86
86
  ownerState: props
87
87
  }),
88
- openPickerButtonProps = _objectWithoutPropertiesLoose(_useSlotProps2, _excluded2);
88
+ openPickerButtonProps = _objectWithoutPropertiesLoose(_useSlotProps2, _excluded3);
89
89
  const OpenPickerIcon = slots.openPickerIcon;
90
90
  const Field = slots.field;
91
91
  const fieldProps = useSlotProps({
@@ -99,6 +99,7 @@ export const useDesktopPicker = ({
99
99
  className,
100
100
  sx,
101
101
  format,
102
+ formatDensity,
102
103
  label,
103
104
  autoFocus: autoFocus && !props.open
104
105
  }),
@@ -8,7 +8,7 @@ import { PickersPopperSlotsComponent, PickersPopperSlotsComponentsProps } from '
8
8
  import { UsePickerParams, UsePickerProps } from '../usePicker';
9
9
  import { BaseSingleInputFieldProps, FieldSection, DateOrTimeView, MuiPickersAdapter } from '../../../models';
10
10
  import { ExportedPickersLayoutSlotsComponent, ExportedPickersLayoutSlotsComponentsProps, PickersLayoutSlotsComponentsProps } from '../../../PickersLayout/PickersLayout.types';
11
- import { UsePickerValueNonStaticProps } from '../usePicker/usePickerValue';
11
+ import { UsePickerValueNonStaticProps } from '../usePicker/usePickerValue.types';
12
12
  import { UsePickerViewsNonStaticProps, UsePickerViewsProps } from '../usePicker/usePickerViews';
13
13
  import { UncapitalizeObjectKeys } from '../../utils/slots-migration';
14
14
  export interface UseDesktopPickerSlotsComponent<TDate, TView extends DateOrTimeView> extends Pick<PickersPopperSlotsComponent, 'DesktopPaper' | 'DesktopTransition' | 'DesktopTrapFocus' | 'Popper'>, ExportedPickersLayoutSlotsComponent<TDate | null, TDate, TView> {
@@ -64,7 +64,7 @@ export interface UseDesktopPickerProps<TDate, TView extends DateOrTimeView, TErr
64
64
  */
65
65
  slotProps?: UseDesktopPickerSlotsComponentsProps<TDate, TView>;
66
66
  }
67
- export interface UseDesktopPickerParams<TDate, TView extends DateOrTimeView, TExternalProps extends UseDesktopPickerProps<TDate, TView, any, TExternalProps>> extends Pick<UsePickerParams<TDate | null, TDate, TView, FieldSection, TExternalProps, {}>, 'valueManager' | 'validator'> {
67
+ export interface UseDesktopPickerParams<TDate, TView extends DateOrTimeView, TExternalProps extends UseDesktopPickerProps<TDate, TView, any, TExternalProps>> extends Pick<UsePickerParams<TDate | null, TDate, TView, FieldSection, TExternalProps, {}>, 'valueManager' | 'valueType' | 'validator'> {
68
68
  props: TExternalProps;
69
69
  getOpenDialogAriaText: (date: TDate | null, utils: MuiPickersAdapter<TDate>) => string;
70
70
  }