@mui/x-date-pickers 7.0.0-beta.1 → 7.0.0-beta.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 (282) hide show
  1. package/AdapterDateFnsBase/AdapterDateFnsBase.d.ts +5 -0
  2. package/AdapterDateFnsJalali/AdapterDateFnsJalali.d.ts +5 -0
  3. package/AdapterDateFnsJalali/AdapterDateFnsJalali.js +0 -1
  4. package/AdapterDayjs/AdapterDayjs.d.ts +5 -0
  5. package/AdapterDayjs/AdapterDayjs.js +0 -1
  6. package/AdapterLuxon/AdapterLuxon.d.ts +5 -0
  7. package/AdapterLuxon/AdapterLuxon.js +1 -2
  8. package/AdapterMoment/AdapterMoment.d.ts +5 -0
  9. package/AdapterMoment/AdapterMoment.js +0 -1
  10. package/AdapterMomentHijri/AdapterMomentHijri.d.ts +5 -0
  11. package/AdapterMomentHijri/AdapterMomentHijri.js +0 -1
  12. package/AdapterMomentJalaali/AdapterMomentJalaali.d.ts +5 -0
  13. package/AdapterMomentJalaali/AdapterMomentJalaali.js +0 -1
  14. package/CHANGELOG.md +159 -1
  15. package/DateCalendar/DateCalendar.d.ts +2 -1
  16. package/DateCalendar/DateCalendar.js +5 -5
  17. package/DateCalendar/DateCalendar.types.d.ts +6 -6
  18. package/DateCalendar/DayCalendar.d.ts +6 -6
  19. package/DateCalendar/useCalendarState.d.ts +7 -7
  20. package/DateCalendar/useIsDateDisabled.d.ts +2 -1
  21. package/DateField/DateField.d.ts +2 -1
  22. package/DateField/DateField.js +5 -5
  23. package/DateField/DateField.types.d.ts +7 -7
  24. package/DateField/useDateField.d.ts +2 -1
  25. package/DatePicker/DatePicker.d.ts +2 -1
  26. package/DatePicker/DatePicker.js +5 -5
  27. package/DatePicker/DatePicker.types.d.ts +4 -3
  28. package/DatePicker/DatePickerToolbar.d.ts +3 -3
  29. package/DatePicker/DatePickerToolbar.js +1 -1
  30. package/DatePicker/shared.d.ts +6 -6
  31. package/DateTimeField/DateTimeField.d.ts +2 -1
  32. package/DateTimeField/DateTimeField.js +9 -9
  33. package/DateTimeField/DateTimeField.types.d.ts +7 -7
  34. package/DateTimeField/useDateTimeField.d.ts +2 -1
  35. package/DateTimePicker/DateTimePicker.d.ts +2 -1
  36. package/DateTimePicker/DateTimePicker.js +9 -9
  37. package/DateTimePicker/DateTimePicker.types.d.ts +4 -3
  38. package/DateTimePicker/DateTimePickerToolbar.d.ts +3 -2
  39. package/DateTimePicker/DateTimePickerToolbar.js +1 -1
  40. package/DateTimePicker/shared.d.ts +6 -6
  41. package/DesktopDatePicker/DesktopDatePicker.d.ts +2 -1
  42. package/DesktopDatePicker/DesktopDatePicker.js +5 -5
  43. package/DesktopDatePicker/DesktopDatePicker.types.d.ts +4 -4
  44. package/DesktopDateTimePicker/DesktopDateTimePicker.d.ts +2 -1
  45. package/DesktopDateTimePicker/DesktopDateTimePicker.js +9 -9
  46. package/DesktopDateTimePicker/DesktopDateTimePicker.types.d.ts +4 -4
  47. package/DesktopTimePicker/DesktopTimePicker.d.ts +2 -1
  48. package/DesktopTimePicker/DesktopTimePicker.js +5 -5
  49. package/DesktopTimePicker/DesktopTimePicker.types.d.ts +4 -4
  50. package/DigitalClock/DigitalClock.d.ts +2 -1
  51. package/DigitalClock/DigitalClock.js +5 -5
  52. package/DigitalClock/DigitalClock.types.d.ts +4 -4
  53. package/LocalizationProvider/LocalizationProvider.d.ts +5 -5
  54. package/MobileDatePicker/MobileDatePicker.d.ts +2 -1
  55. package/MobileDatePicker/MobileDatePicker.js +5 -5
  56. package/MobileDatePicker/MobileDatePicker.types.d.ts +4 -4
  57. package/MobileDateTimePicker/MobileDateTimePicker.d.ts +2 -1
  58. package/MobileDateTimePicker/MobileDateTimePicker.js +9 -9
  59. package/MobileDateTimePicker/MobileDateTimePicker.types.d.ts +4 -4
  60. package/MobileTimePicker/MobileTimePicker.d.ts +2 -1
  61. package/MobileTimePicker/MobileTimePicker.js +5 -5
  62. package/MobileTimePicker/MobileTimePicker.types.d.ts +4 -4
  63. package/MonthCalendar/MonthCalendar.d.ts +3 -2
  64. package/MonthCalendar/MonthCalendar.js +5 -5
  65. package/MonthCalendar/MonthCalendar.types.d.ts +2 -2
  66. package/MultiSectionDigitalClock/MultiSectionDigitalClock.d.ts +2 -1
  67. package/MultiSectionDigitalClock/MultiSectionDigitalClock.js +5 -5
  68. package/MultiSectionDigitalClock/MultiSectionDigitalClock.types.d.ts +4 -3
  69. package/MultiSectionDigitalClock/MultiSectionDigitalClock.utils.d.ts +5 -5
  70. package/PickersCalendarHeader/PickersCalendarHeader.d.ts +2 -1
  71. package/PickersCalendarHeader/PickersCalendarHeader.js +3 -3
  72. package/PickersCalendarHeader/PickersCalendarHeader.types.d.ts +6 -6
  73. package/PickersDay/PickersDay.d.ts +3 -2
  74. package/PickersDay/PickersDay.js +1 -1
  75. package/PickersLayout/PickersLayout.d.ts +2 -1
  76. package/PickersLayout/PickersLayout.types.d.ts +7 -6
  77. package/PickersLayout/usePickerLayout.d.ts +2 -1
  78. package/StaticDatePicker/StaticDatePicker.d.ts +2 -1
  79. package/StaticDatePicker/StaticDatePicker.js +5 -5
  80. package/StaticDatePicker/StaticDatePicker.types.d.ts +4 -4
  81. package/StaticDateTimePicker/StaticDateTimePicker.d.ts +2 -1
  82. package/StaticDateTimePicker/StaticDateTimePicker.js +9 -9
  83. package/StaticDateTimePicker/StaticDateTimePicker.types.d.ts +4 -4
  84. package/StaticTimePicker/StaticTimePicker.d.ts +2 -1
  85. package/StaticTimePicker/StaticTimePicker.js +5 -5
  86. package/StaticTimePicker/StaticTimePicker.types.d.ts +4 -4
  87. package/TimeClock/Clock.d.ts +3 -3
  88. package/TimeClock/ClockNumbers.d.ts +4 -4
  89. package/TimeClock/TimeClock.d.ts +2 -1
  90. package/TimeClock/TimeClock.js +5 -5
  91. package/TimeClock/TimeClock.types.d.ts +3 -3
  92. package/TimeField/TimeField.d.ts +2 -1
  93. package/TimeField/TimeField.js +5 -5
  94. package/TimeField/TimeField.types.d.ts +7 -7
  95. package/TimeField/useTimeField.d.ts +2 -1
  96. package/TimePicker/TimePicker.d.ts +2 -1
  97. package/TimePicker/TimePicker.js +5 -5
  98. package/TimePicker/TimePicker.types.d.ts +4 -3
  99. package/TimePicker/TimePickerToolbar.d.ts +3 -2
  100. package/TimePicker/TimePickerToolbar.js +1 -1
  101. package/TimePicker/shared.d.ts +5 -5
  102. package/YearCalendar/YearCalendar.d.ts +2 -1
  103. package/YearCalendar/YearCalendar.js +5 -5
  104. package/YearCalendar/YearCalendar.types.d.ts +2 -2
  105. package/dateTimeViewRenderers/dateTimeViewRenderers.d.ts +3 -2
  106. package/dateViewRenderers/dateViewRenderers.d.ts +3 -3
  107. package/index.js +1 -1
  108. package/internals/hooks/date-helpers-hooks.d.ts +5 -5
  109. package/internals/hooks/useClockReferenceDate.d.ts +3 -3
  110. package/internals/hooks/useDesktopPicker/useDesktopPicker.d.ts +2 -1
  111. package/internals/hooks/useDesktopPicker/useDesktopPicker.types.d.ts +7 -7
  112. package/internals/hooks/useField/useField.d.ts +2 -2
  113. package/internals/hooks/useField/useField.types.d.ts +7 -7
  114. package/internals/hooks/useField/useField.utils.d.ts +13 -13
  115. package/internals/hooks/useField/useFieldCharacterEditing.d.ts +3 -3
  116. package/internals/hooks/useField/useFieldState.d.ts +2 -2
  117. package/internals/hooks/useMobilePicker/useMobilePicker.d.ts +2 -1
  118. package/internals/hooks/useMobilePicker/useMobilePicker.types.d.ts +7 -7
  119. package/internals/hooks/usePicker/usePicker.d.ts +2 -2
  120. package/internals/hooks/usePicker/usePicker.types.d.ts +4 -4
  121. package/internals/hooks/usePicker/usePickerValue.d.ts +2 -2
  122. package/internals/hooks/usePicker/usePickerValue.types.d.ts +5 -5
  123. package/internals/hooks/usePicker/usePickerViews.d.ts +5 -5
  124. package/internals/hooks/useStaticPicker/useStaticPicker.d.ts +2 -1
  125. package/internals/hooks/useStaticPicker/useStaticPicker.types.d.ts +6 -6
  126. package/internals/hooks/useUtils.d.ts +6 -6
  127. package/internals/hooks/useValidation.d.ts +3 -2
  128. package/internals/hooks/useValueWithTimezone.d.ts +3 -3
  129. package/internals/hooks/useViews.d.ts +2 -1
  130. package/internals/models/fields.d.ts +2 -2
  131. package/internals/models/props/basePickerProps.d.ts +3 -2
  132. package/internals/models/props/clock.d.ts +4 -4
  133. package/internals/models/validation.d.ts +7 -7
  134. package/internals/utils/date-time-utils.d.ts +5 -5
  135. package/internals/utils/date-utils.d.ts +12 -12
  136. package/internals/utils/getDefaultReferenceDate.d.ts +3 -3
  137. package/internals/utils/time-utils.d.ts +6 -6
  138. package/internals/utils/validation/validateDate.d.ts +2 -2
  139. package/internals/utils/validation/validateDateTime.d.ts +2 -2
  140. package/internals/utils/validation/validateTime.d.ts +2 -2
  141. package/internals/utils/valueManagers.d.ts +2 -2
  142. package/legacy/AdapterDateFnsJalali/AdapterDateFnsJalali.js +0 -1
  143. package/legacy/AdapterDayjs/AdapterDayjs.js +0 -1
  144. package/legacy/AdapterLuxon/AdapterLuxon.js +1 -2
  145. package/legacy/AdapterMoment/AdapterMoment.js +0 -1
  146. package/legacy/AdapterMomentHijri/AdapterMomentHijri.js +0 -1
  147. package/legacy/AdapterMomentJalaali/AdapterMomentJalaali.js +0 -1
  148. package/legacy/DateCalendar/DateCalendar.js +5 -5
  149. package/legacy/DateField/DateField.js +5 -5
  150. package/legacy/DatePicker/DatePicker.js +5 -5
  151. package/legacy/DatePicker/DatePickerToolbar.js +1 -1
  152. package/legacy/DateTimeField/DateTimeField.js +9 -9
  153. package/legacy/DateTimePicker/DateTimePicker.js +9 -9
  154. package/legacy/DateTimePicker/DateTimePickerToolbar.js +1 -1
  155. package/legacy/DesktopDatePicker/DesktopDatePicker.js +5 -5
  156. package/legacy/DesktopDateTimePicker/DesktopDateTimePicker.js +9 -9
  157. package/legacy/DesktopTimePicker/DesktopTimePicker.js +5 -5
  158. package/legacy/DigitalClock/DigitalClock.js +5 -5
  159. package/legacy/MobileDatePicker/MobileDatePicker.js +5 -5
  160. package/legacy/MobileDateTimePicker/MobileDateTimePicker.js +9 -9
  161. package/legacy/MobileTimePicker/MobileTimePicker.js +5 -5
  162. package/legacy/MonthCalendar/MonthCalendar.js +5 -5
  163. package/legacy/MultiSectionDigitalClock/MultiSectionDigitalClock.js +5 -5
  164. package/legacy/PickersCalendarHeader/PickersCalendarHeader.js +3 -3
  165. package/legacy/PickersDay/PickersDay.js +1 -1
  166. package/legacy/StaticDatePicker/StaticDatePicker.js +5 -5
  167. package/legacy/StaticDateTimePicker/StaticDateTimePicker.js +9 -9
  168. package/legacy/StaticTimePicker/StaticTimePicker.js +5 -5
  169. package/legacy/TimeClock/TimeClock.js +5 -5
  170. package/legacy/TimeField/TimeField.js +5 -5
  171. package/legacy/TimePicker/TimePicker.js +5 -5
  172. package/legacy/TimePicker/TimePickerToolbar.js +1 -1
  173. package/legacy/YearCalendar/YearCalendar.js +5 -5
  174. package/legacy/index.js +1 -1
  175. package/locales/beBY.d.ts +6 -6
  176. package/locales/caES.d.ts +6 -6
  177. package/locales/csCZ.d.ts +6 -6
  178. package/locales/daDK.d.ts +6 -6
  179. package/locales/deDE.d.ts +6 -6
  180. package/locales/elGR.d.ts +6 -6
  181. package/locales/enUS.d.ts +6 -6
  182. package/locales/esES.d.ts +6 -6
  183. package/locales/eu.d.ts +6 -6
  184. package/locales/faIR.d.ts +6 -6
  185. package/locales/fiFI.d.ts +6 -6
  186. package/locales/frFR.d.ts +6 -6
  187. package/locales/heIL.d.ts +6 -6
  188. package/locales/huHU.d.ts +6 -6
  189. package/locales/isIS.d.ts +6 -6
  190. package/locales/itIT.d.ts +6 -6
  191. package/locales/jaJP.d.ts +6 -6
  192. package/locales/koKR.d.ts +6 -6
  193. package/locales/kzKZ.d.ts +6 -6
  194. package/locales/mk.d.ts +6 -6
  195. package/locales/nbNO.d.ts +6 -6
  196. package/locales/nlNL.d.ts +6 -6
  197. package/locales/plPL.d.ts +6 -6
  198. package/locales/ptBR.d.ts +6 -6
  199. package/locales/roRO.d.ts +6 -6
  200. package/locales/ruRU.d.ts +6 -6
  201. package/locales/skSK.d.ts +6 -6
  202. package/locales/svSE.d.ts +6 -6
  203. package/locales/trTR.d.ts +6 -6
  204. package/locales/ukUA.d.ts +6 -6
  205. package/locales/urPK.d.ts +6 -6
  206. package/locales/utils/getPickersLocalization.d.ts +6 -6
  207. package/locales/utils/pickersLocaleTextApi.d.ts +6 -6
  208. package/locales/viVN.d.ts +6 -6
  209. package/locales/zhCN.d.ts +6 -6
  210. package/locales/zhHK.d.ts +6 -6
  211. package/models/adapters.d.ts +2 -1
  212. package/models/fields.d.ts +3 -2
  213. package/models/pickers.d.ts +3 -0
  214. package/modern/AdapterDateFnsJalali/AdapterDateFnsJalali.js +0 -1
  215. package/modern/AdapterDayjs/AdapterDayjs.js +0 -1
  216. package/modern/AdapterLuxon/AdapterLuxon.js +1 -2
  217. package/modern/AdapterMoment/AdapterMoment.js +0 -1
  218. package/modern/AdapterMomentHijri/AdapterMomentHijri.js +0 -1
  219. package/modern/AdapterMomentJalaali/AdapterMomentJalaali.js +0 -1
  220. package/modern/DateCalendar/DateCalendar.js +5 -5
  221. package/modern/DateField/DateField.js +5 -5
  222. package/modern/DatePicker/DatePicker.js +5 -5
  223. package/modern/DatePicker/DatePickerToolbar.js +1 -1
  224. package/modern/DateTimeField/DateTimeField.js +9 -9
  225. package/modern/DateTimePicker/DateTimePicker.js +9 -9
  226. package/modern/DateTimePicker/DateTimePickerToolbar.js +1 -1
  227. package/modern/DesktopDatePicker/DesktopDatePicker.js +5 -5
  228. package/modern/DesktopDateTimePicker/DesktopDateTimePicker.js +9 -9
  229. package/modern/DesktopTimePicker/DesktopTimePicker.js +5 -5
  230. package/modern/DigitalClock/DigitalClock.js +5 -5
  231. package/modern/MobileDatePicker/MobileDatePicker.js +5 -5
  232. package/modern/MobileDateTimePicker/MobileDateTimePicker.js +9 -9
  233. package/modern/MobileTimePicker/MobileTimePicker.js +5 -5
  234. package/modern/MonthCalendar/MonthCalendar.js +5 -5
  235. package/modern/MultiSectionDigitalClock/MultiSectionDigitalClock.js +5 -5
  236. package/modern/PickersCalendarHeader/PickersCalendarHeader.js +3 -3
  237. package/modern/PickersDay/PickersDay.js +1 -1
  238. package/modern/StaticDatePicker/StaticDatePicker.js +5 -5
  239. package/modern/StaticDateTimePicker/StaticDateTimePicker.js +9 -9
  240. package/modern/StaticTimePicker/StaticTimePicker.js +5 -5
  241. package/modern/TimeClock/TimeClock.js +5 -5
  242. package/modern/TimeField/TimeField.js +5 -5
  243. package/modern/TimePicker/TimePicker.js +5 -5
  244. package/modern/TimePicker/TimePickerToolbar.js +1 -1
  245. package/modern/YearCalendar/YearCalendar.js +5 -5
  246. package/modern/index.js +1 -1
  247. package/node/AdapterDateFnsJalali/AdapterDateFnsJalali.js +0 -1
  248. package/node/AdapterDayjs/AdapterDayjs.js +0 -1
  249. package/node/AdapterLuxon/AdapterLuxon.js +1 -2
  250. package/node/AdapterMoment/AdapterMoment.js +0 -1
  251. package/node/AdapterMomentHijri/AdapterMomentHijri.js +0 -1
  252. package/node/AdapterMomentJalaali/AdapterMomentJalaali.js +0 -1
  253. package/node/DateCalendar/DateCalendar.js +5 -5
  254. package/node/DateField/DateField.js +5 -5
  255. package/node/DatePicker/DatePicker.js +5 -5
  256. package/node/DatePicker/DatePickerToolbar.js +1 -1
  257. package/node/DateTimeField/DateTimeField.js +9 -9
  258. package/node/DateTimePicker/DateTimePicker.js +9 -9
  259. package/node/DateTimePicker/DateTimePickerToolbar.js +1 -1
  260. package/node/DesktopDatePicker/DesktopDatePicker.js +5 -5
  261. package/node/DesktopDateTimePicker/DesktopDateTimePicker.js +9 -9
  262. package/node/DesktopTimePicker/DesktopTimePicker.js +5 -5
  263. package/node/DigitalClock/DigitalClock.js +5 -5
  264. package/node/MobileDatePicker/MobileDatePicker.js +5 -5
  265. package/node/MobileDateTimePicker/MobileDateTimePicker.js +9 -9
  266. package/node/MobileTimePicker/MobileTimePicker.js +5 -5
  267. package/node/MonthCalendar/MonthCalendar.js +5 -5
  268. package/node/MultiSectionDigitalClock/MultiSectionDigitalClock.js +5 -5
  269. package/node/PickersCalendarHeader/PickersCalendarHeader.js +3 -3
  270. package/node/PickersDay/PickersDay.js +1 -1
  271. package/node/StaticDatePicker/StaticDatePicker.js +5 -5
  272. package/node/StaticDateTimePicker/StaticDateTimePicker.js +9 -9
  273. package/node/StaticTimePicker/StaticTimePicker.js +5 -5
  274. package/node/TimeClock/TimeClock.js +5 -5
  275. package/node/TimeField/TimeField.js +5 -5
  276. package/node/TimePicker/TimePicker.js +5 -5
  277. package/node/TimePicker/TimePickerToolbar.js +1 -1
  278. package/node/YearCalendar/YearCalendar.js +5 -5
  279. package/node/index.js +1 -1
  280. package/package.json +1 -1
  281. package/themeAugmentation/props.d.ts +31 -31
  282. package/timeViewRenderers/timeViewRenderers.d.ts +4 -4
@@ -75,7 +75,7 @@ process.env.NODE_ENV !== "production" ? TimePicker.propTypes = {
75
75
  * The default value.
76
76
  * Used when the component is not controlled.
77
77
  */
78
- defaultValue: PropTypes.any,
78
+ defaultValue: PropTypes.object,
79
79
  /**
80
80
  * CSS media query when `Mobile` mode will be changed to `Desktop`.
81
81
  * @default '@media (pointer: fine)'
@@ -135,12 +135,12 @@ process.env.NODE_ENV !== "production" ? TimePicker.propTypes = {
135
135
  * Maximal selectable time.
136
136
  * The date part of the object will be ignored unless `props.disableIgnoringDatePartForTimeValidation === true`.
137
137
  */
138
- maxTime: PropTypes.any,
138
+ maxTime: PropTypes.object,
139
139
  /**
140
140
  * Minimal selectable time.
141
141
  * The date part of the object will be ignored unless `props.disableIgnoringDatePartForTimeValidation === true`.
142
142
  */
143
- minTime: PropTypes.any,
143
+ minTime: PropTypes.object,
144
144
  /**
145
145
  * Step over minutes.
146
146
  * @default 1
@@ -220,7 +220,7 @@ process.env.NODE_ENV !== "production" ? TimePicker.propTypes = {
220
220
  * The date used to generate the new value when both `value` and `defaultValue` are empty.
221
221
  * @default The closest valid date-time using the validation props, except callbacks like `shouldDisable<...>`.
222
222
  */
223
- referenceDate: PropTypes.any,
223
+ referenceDate: PropTypes.object,
224
224
  /**
225
225
  * The currently selected sections.
226
226
  * This prop accept four formats:
@@ -289,7 +289,7 @@ process.env.NODE_ENV !== "production" ? TimePicker.propTypes = {
289
289
  * The selected value.
290
290
  * Used when the component is controlled.
291
291
  */
292
- value: PropTypes.any,
292
+ value: PropTypes.object,
293
293
  /**
294
294
  * The visible view.
295
295
  * Used when the component view is controlled.
@@ -1,11 +1,12 @@
1
1
  import { DesktopTimePickerProps, DesktopTimePickerSlots, DesktopTimePickerSlotProps } from '../DesktopTimePicker';
2
2
  import { TimeViewWithMeridiem } from '../internals/models';
3
3
  import { MobileTimePickerProps, MobileTimePickerSlots, MobileTimePickerSlotProps } from '../MobileTimePicker';
4
- export interface TimePickerSlots<TDate> extends DesktopTimePickerSlots<TDate>, MobileTimePickerSlots<TDate, TimeViewWithMeridiem> {
4
+ import { PickerValidDate } from '../models';
5
+ export interface TimePickerSlots<TDate extends PickerValidDate> extends DesktopTimePickerSlots<TDate>, MobileTimePickerSlots<TDate, TimeViewWithMeridiem> {
5
6
  }
6
- export interface TimePickerSlotProps<TDate> extends DesktopTimePickerSlotProps<TDate>, MobileTimePickerSlotProps<TDate, TimeViewWithMeridiem> {
7
+ export interface TimePickerSlotProps<TDate extends PickerValidDate> extends DesktopTimePickerSlotProps<TDate>, MobileTimePickerSlotProps<TDate, TimeViewWithMeridiem> {
7
8
  }
8
- export interface TimePickerProps<TDate> extends DesktopTimePickerProps<TDate>, Omit<MobileTimePickerProps<TDate, TimeViewWithMeridiem>, 'views'> {
9
+ export interface TimePickerProps<TDate extends PickerValidDate> extends DesktopTimePickerProps<TDate>, Omit<MobileTimePickerProps<TDate, TimeViewWithMeridiem>, 'views'> {
9
10
  /**
10
11
  * CSS media query when `Mobile` mode will be changed to `Desktop`.
11
12
  * @default '@media (pointer: fine)'
@@ -2,7 +2,8 @@ import * as React from 'react';
2
2
  import { BaseToolbarProps, ExportedBaseToolbarProps } from '../internals/models/props/toolbar';
3
3
  import { TimePickerToolbarClasses } from './timePickerToolbarClasses';
4
4
  import { TimeViewWithMeridiem } from '../internals/models';
5
- export interface TimePickerToolbarProps<TDate> extends BaseToolbarProps<TDate | null, TimeViewWithMeridiem> {
5
+ import { PickerValidDate } from '../models';
6
+ export interface TimePickerToolbarProps<TDate extends PickerValidDate> extends BaseToolbarProps<TDate | null, TimeViewWithMeridiem> {
6
7
  ampm?: boolean;
7
8
  ampmInClock?: boolean;
8
9
  classes?: Partial<TimePickerToolbarClasses>;
@@ -21,7 +22,7 @@ export interface ExportedTimePickerToolbarProps extends ExportedBaseToolbarProps
21
22
  *
22
23
  * - [TimePickerToolbar API](https://mui.com/x/api/date-pickers/time-picker-toolbar/)
23
24
  */
24
- declare function TimePickerToolbar<TDate extends unknown>(inProps: TimePickerToolbarProps<TDate>): React.JSX.Element;
25
+ declare function TimePickerToolbar<TDate extends PickerValidDate>(inProps: TimePickerToolbarProps<TDate>): React.JSX.Element;
25
26
  declare namespace TimePickerToolbar {
26
27
  var propTypes: any;
27
28
  }
@@ -241,7 +241,7 @@ process.env.NODE_ENV !== "production" ? TimePickerToolbar.propTypes = {
241
241
  * @default "––"
242
242
  */
243
243
  toolbarPlaceholder: PropTypes.node,
244
- value: PropTypes.any,
244
+ value: PropTypes.object,
245
245
  /**
246
246
  * Currently visible picker view.
247
247
  */
@@ -5,12 +5,12 @@ import { BasePickerInputProps } from '../internals/models/props/basePickerProps'
5
5
  import { BaseTimeValidationProps } from '../internals/models/validation';
6
6
  import { LocalizedComponent } from '../locales/utils/pickersLocaleTextApi';
7
7
  import { TimePickerToolbarProps, ExportedTimePickerToolbarProps } from './TimePickerToolbar';
8
- import { TimeValidationError } from '../models';
8
+ import { PickerValidDate, TimeValidationError } from '../models';
9
9
  import { PickerViewRendererLookup } from '../internals/hooks/usePicker/usePickerViews';
10
10
  import { TimeViewRendererProps } from '../timeViewRenderers';
11
11
  import { BaseClockProps, ExportedBaseClockProps } from '../internals/models/props/clock';
12
12
  import { TimeViewWithMeridiem } from '../internals/models';
13
- export interface BaseTimePickerSlots<TDate> extends TimeClockSlots {
13
+ export interface BaseTimePickerSlots<TDate extends PickerValidDate> extends TimeClockSlots {
14
14
  /**
15
15
  * Custom component for the toolbar rendered above the views.
16
16
  * @default TimePickerToolbar
@@ -20,7 +20,7 @@ export interface BaseTimePickerSlots<TDate> extends TimeClockSlots {
20
20
  export interface BaseTimePickerSlotProps extends TimeClockSlotProps {
21
21
  toolbar?: ExportedTimePickerToolbarProps;
22
22
  }
23
- export interface BaseTimePickerProps<TDate, TView extends TimeViewWithMeridiem> extends BasePickerInputProps<TDate | null, TDate, TView, TimeValidationError>, ExportedBaseClockProps<TDate> {
23
+ export interface BaseTimePickerProps<TDate extends PickerValidDate, TView extends TimeViewWithMeridiem> extends BasePickerInputProps<TDate | null, TDate, TView, TimeValidationError>, ExportedBaseClockProps<TDate> {
24
24
  /**
25
25
  * Display ampm controls under the clock (instead of in the toolbar).
26
26
  * @default true on desktop, false on mobile
@@ -43,6 +43,6 @@ export interface BaseTimePickerProps<TDate, TView extends TimeViewWithMeridiem>
43
43
  */
44
44
  viewRenderers?: Partial<PickerViewRendererLookup<TDate | null, TView, TimeViewRendererProps<TView, BaseClockProps<TDate, TView>>, {}>>;
45
45
  }
46
- type UseTimePickerDefaultizedProps<TDate, TView extends TimeViewWithMeridiem, Props extends BaseTimePickerProps<TDate, TView>> = LocalizedComponent<TDate, DefaultizedProps<Props, 'views' | 'openTo' | 'ampm' | keyof BaseTimeValidationProps>>;
47
- export declare function useTimePickerDefaultizedProps<TDate, TView extends TimeViewWithMeridiem, Props extends BaseTimePickerProps<TDate, TView>>(props: Props, name: string): UseTimePickerDefaultizedProps<TDate, TView, Props>;
46
+ type UseTimePickerDefaultizedProps<TDate extends PickerValidDate, TView extends TimeViewWithMeridiem, Props extends BaseTimePickerProps<TDate, TView>> = LocalizedComponent<TDate, DefaultizedProps<Props, 'views' | 'openTo' | 'ampm' | keyof BaseTimeValidationProps>>;
47
+ export declare function useTimePickerDefaultizedProps<TDate extends PickerValidDate, TView extends TimeViewWithMeridiem, Props extends BaseTimePickerProps<TDate, TView>>(props: Props, name: string): UseTimePickerDefaultizedProps<TDate, TView, Props>;
48
48
  export {};
@@ -1,6 +1,7 @@
1
1
  import * as React from 'react';
2
2
  import { YearCalendarProps } from './YearCalendar.types';
3
- type YearCalendarComponent = (<TDate>(props: YearCalendarProps<TDate>) => React.JSX.Element) & {
3
+ import { PickerValidDate } from '../models';
4
+ type YearCalendarComponent = (<TDate extends PickerValidDate>(props: YearCalendarProps<TDate>) => React.JSX.Element) & {
4
5
  propTypes?: any;
5
6
  };
6
7
  /**
@@ -270,7 +270,7 @@ process.env.NODE_ENV !== "production" ? YearCalendar.propTypes = {
270
270
  * The default selected value.
271
271
  * Used when the component is not controlled.
272
272
  */
273
- defaultValue: PropTypes.any,
273
+ defaultValue: PropTypes.object,
274
274
  /**
275
275
  * If `true` picker is disabled
276
276
  */
@@ -295,11 +295,11 @@ process.env.NODE_ENV !== "production" ? YearCalendar.propTypes = {
295
295
  /**
296
296
  * Maximal selectable date.
297
297
  */
298
- maxDate: PropTypes.any,
298
+ maxDate: PropTypes.object,
299
299
  /**
300
300
  * Minimal selectable date.
301
301
  */
302
- minDate: PropTypes.any,
302
+ minDate: PropTypes.object,
303
303
  /**
304
304
  * Callback fired when the value changes.
305
305
  * @template TDate
@@ -316,7 +316,7 @@ process.env.NODE_ENV !== "production" ? YearCalendar.propTypes = {
316
316
  * The date used to generate the new value when both `value` and `defaultValue` are empty.
317
317
  * @default The closest valid year using the validation props, except callbacks such as `shouldDisableYear`.
318
318
  */
319
- referenceDate: PropTypes.any,
319
+ referenceDate: PropTypes.object,
320
320
  /**
321
321
  * Disable specific year.
322
322
  * @template TDate
@@ -340,7 +340,7 @@ process.env.NODE_ENV !== "production" ? YearCalendar.propTypes = {
340
340
  * The selected value.
341
341
  * Used when the component is controlled.
342
342
  */
343
- value: PropTypes.any,
343
+ value: PropTypes.object,
344
344
  /**
345
345
  * Years rendered per row.
346
346
  * @default 3
@@ -2,7 +2,7 @@ import { SxProps } from '@mui/system';
2
2
  import { Theme } from '@mui/material/styles';
3
3
  import { YearCalendarClasses } from './yearCalendarClasses';
4
4
  import { BaseDateValidationProps, YearValidationProps } from '../internals/models/validation';
5
- import { TimezoneProps } from '../models';
5
+ import { PickerValidDate, TimezoneProps } from '../models';
6
6
  export interface ExportedYearCalendarProps {
7
7
  /**
8
8
  * Years rendered per row.
@@ -10,7 +10,7 @@ export interface ExportedYearCalendarProps {
10
10
  */
11
11
  yearsPerRow?: 3 | 4;
12
12
  }
13
- export interface YearCalendarProps<TDate> extends ExportedYearCalendarProps, YearValidationProps<TDate>, BaseDateValidationProps<TDate>, TimezoneProps {
13
+ export interface YearCalendarProps<TDate extends PickerValidDate> extends ExportedYearCalendarProps, YearValidationProps<TDate>, BaseDateValidationProps<TDate>, TimezoneProps {
14
14
  autoFocus?: boolean;
15
15
  className?: string;
16
16
  /**
@@ -3,7 +3,8 @@ import { DateCalendarProps } from '../DateCalendar';
3
3
  import { DateOrTimeViewWithMeridiem } from '../internals/models';
4
4
  import { MultiSectionDigitalClockProps } from '../MultiSectionDigitalClock';
5
5
  import type { DateTimePickerProps } from '../DateTimePicker/DateTimePicker.types';
6
- export interface DateTimeViewRendererProps<TDate> extends Omit<DateCalendarProps<TDate> & MultiSectionDigitalClockProps<TDate>, 'views' | 'openTo' | 'view' | 'onViewChange' | 'focusedView' | 'slots' | 'slotProps'>, Pick<DateTimePickerProps<TDate>, 'slots' | 'slotProps'> {
6
+ import { PickerValidDate } from '../models';
7
+ export interface DateTimeViewRendererProps<TDate extends PickerValidDate> extends Omit<DateCalendarProps<TDate> & MultiSectionDigitalClockProps<TDate>, 'views' | 'openTo' | 'view' | 'onViewChange' | 'focusedView' | 'slots' | 'slotProps'>, Pick<DateTimePickerProps<TDate>, 'slots' | 'slotProps'> {
7
8
  view: DateOrTimeViewWithMeridiem;
8
9
  onViewChange?: (view: DateOrTimeViewWithMeridiem) => void;
9
10
  views: readonly DateOrTimeViewWithMeridiem[];
@@ -11,4 +12,4 @@ export interface DateTimeViewRendererProps<TDate> extends Omit<DateCalendarProps
11
12
  timeViewsCount: number;
12
13
  shouldRenderTimeInASingleColumn: boolean;
13
14
  }
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;
15
+ export declare const renderDesktopDateTimeView: <TDate extends PickerValidDate>({ 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;
@@ -1,11 +1,11 @@
1
1
  import * as React from 'react';
2
2
  import { DateCalendarProps } from '../DateCalendar';
3
- import { DateView } from '../models';
3
+ import { DateView, PickerValidDate } from '../models';
4
4
  import { DateOrTimeViewWithMeridiem } from '../internals/models';
5
- export interface DateViewRendererProps<TDate, TView extends DateOrTimeViewWithMeridiem> extends Omit<DateCalendarProps<TDate>, 'views' | 'openTo' | 'view' | 'onViewChange' | 'focusedView'> {
5
+ export interface DateViewRendererProps<TDate extends PickerValidDate, TView extends DateOrTimeViewWithMeridiem> extends Omit<DateCalendarProps<TDate>, 'views' | 'openTo' | 'view' | 'onViewChange' | 'focusedView'> {
6
6
  view: TView;
7
7
  onViewChange?: (view: TView) => void;
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, 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 PickerValidDate>({ 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;
package/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @mui/x-date-pickers v7.0.0-beta.1
2
+ * @mui/x-date-pickers v7.0.0-beta.2
3
3
  *
4
4
  * @license MIT
5
5
  * This source code is licensed under the MIT license found in the
@@ -1,16 +1,16 @@
1
1
  import { PickerOnChangeFn } from './useViews';
2
2
  import { PickerSelectionState } from './usePicker';
3
- import { PickersTimezone } from '../../models';
4
- export interface MonthValidationOptions<TDate> {
3
+ import { PickersTimezone, PickerValidDate } from '../../models';
4
+ export interface MonthValidationOptions<TDate extends PickerValidDate> {
5
5
  disablePast?: boolean;
6
6
  disableFuture?: boolean;
7
7
  minDate: TDate;
8
8
  maxDate: TDate;
9
9
  timezone: PickersTimezone;
10
10
  }
11
- export declare function useNextMonthDisabled<TDate>(month: TDate, { disableFuture, maxDate, timezone, }: Pick<MonthValidationOptions<TDate>, 'disableFuture' | 'maxDate' | 'timezone'>): boolean;
12
- export declare function usePreviousMonthDisabled<TDate>(month: TDate, { disablePast, minDate, timezone, }: Pick<MonthValidationOptions<TDate>, 'disablePast' | 'minDate' | 'timezone'>): boolean;
13
- export declare function useMeridiemMode<TDate>(date: TDate | null, ampm: boolean | undefined, onChange: PickerOnChangeFn<TDate>, selectionState?: PickerSelectionState): {
11
+ export declare function useNextMonthDisabled<TDate extends PickerValidDate>(month: TDate, { disableFuture, maxDate, timezone, }: Pick<MonthValidationOptions<TDate>, 'disableFuture' | 'maxDate' | 'timezone'>): boolean;
12
+ export declare function usePreviousMonthDisabled<TDate extends PickerValidDate>(month: TDate, { disablePast, minDate, timezone, }: Pick<MonthValidationOptions<TDate>, 'disablePast' | 'minDate' | 'timezone'>): boolean;
13
+ export declare function useMeridiemMode<TDate extends PickerValidDate>(date: TDate | null, ampm: boolean | undefined, onChange: PickerOnChangeFn<TDate>, selectionState?: PickerSelectionState): {
14
14
  meridiemMode: import("../utils/time-utils").Meridiem | null;
15
15
  handleMeridiemChange: (mode: 'am' | 'pm') => void;
16
16
  };
@@ -1,8 +1,8 @@
1
- import { MuiPickersAdapter, PickersTimezone } from '../../models';
2
- export declare const useClockReferenceDate: <TDate, TProps extends {}>({ value, referenceDate: referenceDateProp, utils, props, timezone, }: {
1
+ import { MuiPickersAdapter, PickersTimezone, PickerValidDate } from '../../models';
2
+ export declare const useClockReferenceDate: <TDate extends PickerValidDate, TProps extends {}>({ value, referenceDate: referenceDateProp, utils, props, timezone, }: {
3
3
  value: TDate;
4
4
  referenceDate: TDate | undefined;
5
5
  utils: MuiPickersAdapter<TDate, any>;
6
6
  props: TProps;
7
7
  timezone: PickersTimezone;
8
- }) => any;
8
+ }) => TDate;
@@ -1,5 +1,6 @@
1
1
  import * as React from 'react';
2
2
  import { UseDesktopPickerParams, UseDesktopPickerProps } from './useDesktopPicker.types';
3
+ import { PickerValidDate } from '../../../models';
3
4
  import { DateOrTimeViewWithMeridiem } from '../../models';
4
5
  /**
5
6
  * Hook managing all the single-date desktop pickers:
@@ -7,6 +8,6 @@ import { DateOrTimeViewWithMeridiem } from '../../models';
7
8
  * - DesktopDateTimePicker
8
9
  * - DesktopTimePicker
9
10
  */
10
- export declare const useDesktopPicker: <TDate, TView extends DateOrTimeViewWithMeridiem, TExternalProps extends UseDesktopPickerProps<TDate, TView, any, TExternalProps>>({ props, getOpenDialogAriaText, ...pickerParams }: UseDesktopPickerParams<TDate, TView, TExternalProps>) => {
11
+ export declare const useDesktopPicker: <TDate extends PickerValidDate, TView extends DateOrTimeViewWithMeridiem, TExternalProps extends UseDesktopPickerProps<TDate, TView, any, TExternalProps>>({ props, getOpenDialogAriaText, ...pickerParams }: UseDesktopPickerParams<TDate, TView, TExternalProps>) => {
11
12
  renderPicker: () => React.JSX.Element;
12
13
  };
@@ -6,13 +6,13 @@ import { SlotComponentProps } from '@mui/base/utils';
6
6
  import { BaseNonStaticPickerProps, BasePickerProps, BaseNonRangeNonStaticPickerProps } from '../../models/props/basePickerProps';
7
7
  import { PickersPopperSlots, PickersPopperSlotProps } from '../../components/PickersPopper';
8
8
  import { UsePickerParams, UsePickerProps } from '../usePicker';
9
- import { BaseSingleInputFieldProps, FieldSection, MuiPickersAdapter } from '../../../models';
9
+ import { BaseSingleInputFieldProps, FieldSection, MuiPickersAdapter, PickerValidDate } from '../../../models';
10
10
  import { ExportedPickersLayoutSlots, ExportedPickersLayoutSlotProps, PickersLayoutSlotProps } from '../../../PickersLayout/PickersLayout.types';
11
11
  import { UsePickerValueNonStaticProps } from '../usePicker/usePickerValue.types';
12
12
  import { UsePickerViewsNonStaticProps, UsePickerViewsProps } from '../usePicker/usePickerViews';
13
13
  import { DateOrTimeViewWithMeridiem } from '../../models';
14
14
  import { UseClearableFieldSlots, UseClearableFieldSlotProps } from '../../../hooks/useClearableField';
15
- export interface UseDesktopPickerSlots<TDate, TView extends DateOrTimeViewWithMeridiem> extends Pick<PickersPopperSlots, 'desktopPaper' | 'desktopTransition' | 'desktopTrapFocus' | 'popper'>, ExportedPickersLayoutSlots<TDate | null, TDate, TView>, UseClearableFieldSlots {
15
+ export interface UseDesktopPickerSlots<TDate extends PickerValidDate, TView extends DateOrTimeViewWithMeridiem> extends Pick<PickersPopperSlots, 'desktopPaper' | 'desktopTransition' | 'desktopTrapFocus' | 'popper'>, ExportedPickersLayoutSlots<TDate | null, TDate, TView>, UseClearableFieldSlots {
16
16
  /**
17
17
  * Component used to enter the date with the keyboard.
18
18
  */
@@ -38,22 +38,22 @@ export interface UseDesktopPickerSlots<TDate, TView extends DateOrTimeViewWithMe
38
38
  */
39
39
  openPickerIcon: React.ElementType;
40
40
  }
41
- export interface UseDesktopPickerSlotProps<TDate, TView extends DateOrTimeViewWithMeridiem> extends ExportedUseDesktopPickerSlotProps<TDate, TView>, Pick<PickersLayoutSlotProps<TDate | null, TDate, TView>, 'toolbar'> {
41
+ export interface UseDesktopPickerSlotProps<TDate extends PickerValidDate, TView extends DateOrTimeViewWithMeridiem> extends ExportedUseDesktopPickerSlotProps<TDate, TView>, Pick<PickersLayoutSlotProps<TDate | null, TDate, TView>, 'toolbar'> {
42
42
  }
43
- export interface ExportedUseDesktopPickerSlotProps<TDate, TView extends DateOrTimeViewWithMeridiem> extends PickersPopperSlotProps, ExportedPickersLayoutSlotProps<TDate | null, TDate, TView>, UseClearableFieldSlotProps {
43
+ export interface ExportedUseDesktopPickerSlotProps<TDate extends PickerValidDate, TView extends DateOrTimeViewWithMeridiem> extends PickersPopperSlotProps, ExportedPickersLayoutSlotProps<TDate | null, TDate, TView>, UseClearableFieldSlotProps {
44
44
  field?: SlotComponentProps<React.ElementType<BaseSingleInputFieldProps<TDate | null, TDate, FieldSection, unknown>>, {}, UsePickerProps<TDate | null, TDate, any, FieldSection, any, any, any>>;
45
45
  textField?: SlotComponentProps<typeof TextField, {}, Record<string, any>>;
46
46
  inputAdornment?: Partial<InputAdornmentProps>;
47
47
  openPickerButton?: SlotComponentProps<typeof IconButton, {}, UseDesktopPickerProps<TDate, any, any, any>>;
48
48
  openPickerIcon?: Record<string, any>;
49
49
  }
50
- export interface DesktopOnlyPickerProps<TDate> extends BaseNonStaticPickerProps, BaseNonRangeNonStaticPickerProps, UsePickerValueNonStaticProps<TDate | null, FieldSection>, UsePickerViewsNonStaticProps {
50
+ export interface DesktopOnlyPickerProps<TDate extends PickerValidDate> extends BaseNonStaticPickerProps, BaseNonRangeNonStaticPickerProps, UsePickerValueNonStaticProps<TDate | null, FieldSection>, UsePickerViewsNonStaticProps {
51
51
  /**
52
52
  * If `true`, the `input` element is focused during the first mount.
53
53
  */
54
54
  autoFocus?: boolean;
55
55
  }
56
- export interface UseDesktopPickerProps<TDate, TView extends DateOrTimeViewWithMeridiem, TError, TExternalProps extends UsePickerViewsProps<any, any, TView, any, any>> extends BasePickerProps<TDate | null, TDate, TView, TError, TExternalProps, {}>, DesktopOnlyPickerProps<TDate> {
56
+ export interface UseDesktopPickerProps<TDate extends PickerValidDate, TView extends DateOrTimeViewWithMeridiem, TError, TExternalProps extends UsePickerViewsProps<any, any, TView, any, any>> extends BasePickerProps<TDate | null, TDate, TView, TError, TExternalProps, {}>, DesktopOnlyPickerProps<TDate> {
57
57
  /**
58
58
  * Overridable component slots.
59
59
  * @default {}
@@ -65,7 +65,7 @@ export interface UseDesktopPickerProps<TDate, TView extends DateOrTimeViewWithMe
65
65
  */
66
66
  slotProps?: UseDesktopPickerSlotProps<TDate, TView>;
67
67
  }
68
- export interface UseDesktopPickerParams<TDate, TView extends DateOrTimeViewWithMeridiem, TExternalProps extends UseDesktopPickerProps<TDate, TView, any, TExternalProps>> extends Pick<UsePickerParams<TDate | null, TDate, TView, FieldSection, TExternalProps, {}>, 'valueManager' | 'valueType' | 'validator'> {
68
+ export interface UseDesktopPickerParams<TDate extends PickerValidDate, TView extends DateOrTimeViewWithMeridiem, TExternalProps extends UseDesktopPickerProps<TDate, TView, any, TExternalProps>> extends Pick<UsePickerParams<TDate | null, TDate, TView, FieldSection, TExternalProps, {}>, 'valueManager' | 'valueType' | 'validator'> {
69
69
  props: TExternalProps;
70
70
  getOpenDialogAriaText: (date: TDate | null, utils: MuiPickersAdapter<TDate>) => string;
71
71
  }
@@ -1,5 +1,5 @@
1
1
  import { UseFieldParams, UseFieldResponse, UseFieldForwardedProps, UseFieldInternalProps } from './useField.types';
2
- import { FieldSection } from '../../../models';
3
- export declare const useField: <TValue, TDate, TSection extends FieldSection, TForwardedProps extends UseFieldForwardedProps, TInternalProps extends UseFieldInternalProps<any, any, any, any> & {
2
+ import { FieldSection, PickerValidDate } from '../../../models';
3
+ export declare const useField: <TValue, TDate extends PickerValidDate, TSection extends FieldSection, TForwardedProps extends UseFieldForwardedProps, TInternalProps extends UseFieldInternalProps<any, any, any, any> & {
4
4
  minutesStep?: number | undefined;
5
5
  }>(params: UseFieldParams<TValue, TDate, TSection, TForwardedProps, TInternalProps>) => UseFieldResponse<TForwardedProps>;
@@ -1,8 +1,8 @@
1
1
  import * as React from 'react';
2
- import { FieldSectionType, FieldSection, FieldSelectedSections, MuiPickersAdapter, TimezoneProps, FieldSectionContentType, FieldValueType, PickersTimezone } from '../../../models';
2
+ import { FieldSectionType, FieldSection, FieldSelectedSections, MuiPickersAdapter, TimezoneProps, FieldSectionContentType, FieldValueType, PickersTimezone, PickerValidDate } from '../../../models';
3
3
  import type { PickerValueManager } from '../usePicker';
4
4
  import { InferError, Validator } from '../useValidation';
5
- export interface UseFieldParams<TValue, TDate, TSection extends FieldSection, TForwardedProps extends UseFieldForwardedProps, TInternalProps extends UseFieldInternalProps<any, any, any, any>> {
5
+ export interface UseFieldParams<TValue, TDate extends PickerValidDate, TSection extends FieldSection, TForwardedProps extends UseFieldForwardedProps, TInternalProps extends UseFieldInternalProps<any, any, any, any>> {
6
6
  forwardedProps: TForwardedProps;
7
7
  internalProps: TInternalProps;
8
8
  valueManager: PickerValueManager<TValue, TDate, InferError<TInternalProps>>;
@@ -10,7 +10,7 @@ export interface UseFieldParams<TValue, TDate, TSection extends FieldSection, TF
10
10
  validator: Validator<TValue, TDate, InferError<TInternalProps>, UseFieldValidationProps<TValue, TInternalProps>>;
11
11
  valueType: FieldValueType;
12
12
  }
13
- export interface UseFieldInternalProps<TValue, TDate, TSection extends FieldSection, TError> extends TimezoneProps {
13
+ export interface UseFieldInternalProps<TValue, TDate extends PickerValidDate, TSection extends FieldSection, TError> extends TimezoneProps {
14
14
  /**
15
15
  * The selected value.
16
16
  * Used when the component is controlled.
@@ -147,13 +147,13 @@ export type UseFieldResponse<TForwardedProps extends UseFieldForwardedProps> = O
147
147
  autoComplete: 'off';
148
148
  };
149
149
  export type FieldSectionWithoutPosition<TSection extends FieldSection = FieldSection> = Omit<TSection, 'start' | 'end' | 'startInInput' | 'endInInput'>;
150
- export type FieldSectionValueBoundaries<TDate, SectionType extends FieldSectionType> = {
150
+ export type FieldSectionValueBoundaries<TDate extends PickerValidDate, SectionType extends FieldSectionType> = {
151
151
  minimum: number;
152
152
  maximum: number;
153
153
  } & (SectionType extends 'day' ? {
154
154
  longestMonth: TDate;
155
155
  } : {});
156
- export type FieldSectionsValueBoundaries<TDate> = {
156
+ export type FieldSectionsValueBoundaries<TDate extends PickerValidDate> = {
157
157
  [SectionType in FieldSectionType]: (params: {
158
158
  currentDate: TDate | null;
159
159
  format: string;
@@ -168,7 +168,7 @@ export interface FieldChangeHandlerContext<TError> {
168
168
  * Object used to access and update the active date (i.e: the date containing the active section).
169
169
  * Mainly useful in the range fields where we need to update the date containing the active section without impacting the other one.
170
170
  */
171
- interface FieldActiveDateManager<TValue, TDate, TSection extends FieldSection> {
171
+ interface FieldActiveDateManager<TValue, TDate extends PickerValidDate, TSection extends FieldSection> {
172
172
  /**
173
173
  * Active date from `state.value`.
174
174
  */
@@ -200,7 +200,7 @@ export type FieldSelectedSectionsIndexes = {
200
200
  */
201
201
  shouldSelectBoundarySelectors: boolean;
202
202
  };
203
- export interface FieldValueManager<TValue, TDate, TSection extends FieldSection> {
203
+ export interface FieldValueManager<TValue, TDate extends PickerValidDate, TSection extends FieldSection> {
204
204
  /**
205
205
  * Creates the section list from the current value.
206
206
  * The `prevSections` are used on the range fields to avoid losing the sections of a partially filled date when editing the other date.
@@ -1,13 +1,13 @@
1
1
  import { AvailableAdjustKeyCode, FieldSectionsValueBoundaries, SectionOrdering, FieldSectionWithoutPosition, FieldSectionValueBoundaries } from './useField.types';
2
- import { FieldSectionType, FieldValueType, FieldSection, MuiPickersAdapter, FieldSectionContentType, PickersTimezone } from '../../../models';
2
+ import { FieldSectionType, FieldValueType, FieldSection, MuiPickersAdapter, FieldSectionContentType, PickersTimezone, PickerValidDate } from '../../../models';
3
3
  import { PickersLocaleText } from '../../../locales/utils/pickersLocaleTextApi';
4
- export declare const getDateSectionConfigFromFormatToken: <TDate>(utils: MuiPickersAdapter<TDate, any>, formatToken: string) => Pick<FieldSection, 'type' | 'contentType'> & {
4
+ export declare const getDateSectionConfigFromFormatToken: <TDate extends PickerValidDate>(utils: MuiPickersAdapter<TDate, any>, formatToken: string) => Pick<FieldSection, 'type' | 'contentType'> & {
5
5
  maxLength: number | undefined;
6
6
  };
7
- export declare const getDaysInWeekStr: <TDate>(utils: MuiPickersAdapter<TDate, any>, timezone: PickersTimezone, format: string) => string[];
8
- export declare const getLetterEditingOptions: <TDate>(utils: MuiPickersAdapter<TDate, any>, timezone: PickersTimezone, sectionType: FieldSectionType, format: string) => string[];
7
+ export declare const getDaysInWeekStr: <TDate extends PickerValidDate>(utils: MuiPickersAdapter<TDate, any>, timezone: PickersTimezone, format: string) => string[];
8
+ export declare const getLetterEditingOptions: <TDate extends PickerValidDate>(utils: MuiPickersAdapter<TDate, any>, timezone: PickersTimezone, sectionType: FieldSectionType, format: string) => string[];
9
9
  export declare const FORMAT_SECONDS_NO_LEADING_ZEROS = "s";
10
- export declare const getLocalizedDigits: <TDate>(utils: MuiPickersAdapter<TDate, any>) => string[];
10
+ export declare const getLocalizedDigits: <TDate extends PickerValidDate>(utils: MuiPickersAdapter<TDate, any>) => string[];
11
11
  export declare const removeLocalizedDigits: (valueStr: string, localizedDigits: string[]) => string;
12
12
  export declare const applyLocalizedDigits: (valueStr: string, localizedDigits: string[]) => string;
13
13
  export declare const isStringNumber: (valueStr: string, localizedDigits: string[]) => boolean;
@@ -17,24 +17,24 @@ export declare const isStringNumber: (valueStr: string, localizedDigits: string[
17
17
  * Warning: Should only be called with non-localized digits. Call `removeLocalizedDigits` with your value if needed.
18
18
  */
19
19
  export declare const cleanLeadingZeros: (valueStr: string, size: number) => string;
20
- export declare const cleanDigitSectionValue: <TDate>(utils: MuiPickersAdapter<TDate, any>, value: number, sectionBoundaries: FieldSectionValueBoundaries<TDate, any>, localizedDigits: string[], section: Pick<FieldSection, 'format' | 'type' | 'contentType' | 'hasLeadingZerosInFormat' | 'hasLeadingZerosInInput' | 'maxLength'>) => string;
21
- export declare const adjustSectionValue: <TDate, TSection extends FieldSection>(utils: MuiPickersAdapter<TDate, any>, timezone: PickersTimezone, section: TSection, keyCode: AvailableAdjustKeyCode, sectionsValueBoundaries: FieldSectionsValueBoundaries<TDate>, localizedDigits: string[], activeDate: TDate | null, stepsAttributes?: {
20
+ export declare const cleanDigitSectionValue: <TDate extends PickerValidDate>(utils: MuiPickersAdapter<TDate, any>, value: number, sectionBoundaries: FieldSectionValueBoundaries<TDate, any>, localizedDigits: string[], section: Pick<FieldSection, 'format' | 'type' | 'contentType' | 'hasLeadingZerosInFormat' | 'hasLeadingZerosInInput' | 'maxLength'>) => string;
21
+ export declare const adjustSectionValue: <TDate extends PickerValidDate, TSection extends FieldSection>(utils: MuiPickersAdapter<TDate, any>, timezone: PickersTimezone, section: TSection, keyCode: AvailableAdjustKeyCode, sectionsValueBoundaries: FieldSectionsValueBoundaries<TDate>, localizedDigits: string[], activeDate: TDate | null, stepsAttributes?: {
22
22
  minutesStep?: number;
23
23
  }) => string;
24
24
  export declare const getSectionVisibleValue: (section: FieldSectionWithoutPosition, target: 'input-rtl' | 'input-ltr' | 'non-input', localizedDigits: string[]) => string;
25
25
  export declare const cleanString: (dirtyString: string) => string;
26
26
  export declare const addPositionPropertiesToSections: <TSection extends FieldSection>(sections: FieldSectionWithoutPosition<TSection>[], localizedDigits: string[], isRTL: boolean) => TSection[];
27
- export declare const changeSectionValueFormat: <TDate>(utils: MuiPickersAdapter<TDate, any>, valueStr: string, currentFormat: string, newFormat: string) => string;
28
- export declare const doesSectionFormatHaveLeadingZeros: <TDate>(utils: MuiPickersAdapter<TDate, any>, timezone: PickersTimezone, contentType: FieldSectionContentType, sectionType: FieldSectionType, format: string) => boolean;
29
- export declare const splitFormatIntoSections: <TDate>(utils: MuiPickersAdapter<TDate, any>, timezone: PickersTimezone, localeText: PickersLocaleText<TDate>, localizedDigits: string[], format: string, date: TDate | null, formatDensity: 'dense' | 'spacious', shouldRespectLeadingZeros: boolean, isRTL: boolean) => FieldSectionWithoutPosition[];
27
+ export declare const changeSectionValueFormat: <TDate extends PickerValidDate>(utils: MuiPickersAdapter<TDate, any>, valueStr: string, currentFormat: string, newFormat: string) => string;
28
+ export declare const doesSectionFormatHaveLeadingZeros: <TDate extends PickerValidDate>(utils: MuiPickersAdapter<TDate, any>, timezone: PickersTimezone, contentType: FieldSectionContentType, sectionType: FieldSectionType, format: string) => boolean;
29
+ export declare const splitFormatIntoSections: <TDate extends PickerValidDate>(utils: MuiPickersAdapter<TDate, any>, timezone: PickersTimezone, localeText: PickersLocaleText<TDate>, localizedDigits: string[], format: string, date: TDate | null, formatDensity: 'dense' | 'spacious', shouldRespectLeadingZeros: boolean, isRTL: boolean) => FieldSectionWithoutPosition[];
30
30
  /**
31
31
  * Some date libraries like `dayjs` don't support parsing from date with escaped characters.
32
32
  * To make sure that the parsing works, we are building a format and a date without any separator.
33
33
  */
34
- export declare const getDateFromDateSections: <TDate>(utils: MuiPickersAdapter<TDate, any>, sections: FieldSection[], localizedDigits: string[]) => NonNullable<TDate>;
34
+ export declare const getDateFromDateSections: <TDate extends PickerValidDate>(utils: MuiPickersAdapter<TDate, any>, sections: FieldSection[], localizedDigits: string[]) => TDate;
35
35
  export declare const createDateStrForInputFromSections: (sections: FieldSection[], localizedDigits: string[], isRTL: boolean) => string;
36
- export declare const getSectionsBoundaries: <TDate>(utils: MuiPickersAdapter<TDate, any>, localizedDigits: string[], timezone: PickersTimezone) => FieldSectionsValueBoundaries<TDate>;
36
+ export declare const getSectionsBoundaries: <TDate extends PickerValidDate>(utils: MuiPickersAdapter<TDate, any>, localizedDigits: string[], timezone: PickersTimezone) => FieldSectionsValueBoundaries<TDate>;
37
37
  export declare const validateSections: <TSection extends FieldSection>(sections: TSection[], valueType: FieldValueType) => void;
38
- export declare const mergeDateIntoReferenceDate: <TDate>(utils: MuiPickersAdapter<TDate, any>, timezone: PickersTimezone, dateToTransferFrom: TDate, sections: FieldSectionWithoutPosition[], referenceDate: TDate, shouldLimitToEditedSections: boolean) => TDate;
38
+ export declare const mergeDateIntoReferenceDate: <TDate extends PickerValidDate>(utils: MuiPickersAdapter<TDate, any>, timezone: PickersTimezone, dateToTransferFrom: TDate, sections: FieldSectionWithoutPosition[], referenceDate: TDate, shouldLimitToEditedSections: boolean) => TDate;
39
39
  export declare const isAndroid: () => boolean;
40
40
  export declare const getSectionOrder: (sections: FieldSectionWithoutPosition[], isRTL: boolean) => SectionOrdering;
@@ -1,11 +1,11 @@
1
- import { FieldSection, PickersTimezone } from '../../../models';
1
+ import { FieldSection, PickersTimezone, PickerValidDate } from '../../../models';
2
2
  import { FieldSectionsValueBoundaries } from './useField.types';
3
3
  import { UpdateSectionValueParams } from './useFieldState';
4
4
  interface ApplyCharacterEditingParams {
5
5
  keyPressed: string;
6
6
  sectionIndex: number;
7
7
  }
8
- interface UseFieldEditingParams<TDate, TSection extends FieldSection> {
8
+ interface UseFieldEditingParams<TDate extends PickerValidDate, TSection extends FieldSection> {
9
9
  sections: TSection[];
10
10
  updateSectionValue: (params: UpdateSectionValueParams<TSection>) => void;
11
11
  sectionsValueBoundaries: FieldSectionsValueBoundaries<TDate>;
@@ -20,7 +20,7 @@ interface UseFieldEditingParams<TDate, TSection extends FieldSection> {
20
20
  * 1. The numeric editing when the user presses a digit
21
21
  * 2. The letter editing when the user presses another key
22
22
  */
23
- export declare const useFieldCharacterEditing: <TDate, TSection extends FieldSection>({ sections, updateSectionValue, sectionsValueBoundaries, localizedDigits, setTempAndroidValueStr, timezone, }: UseFieldEditingParams<TDate, TSection>) => {
23
+ export declare const useFieldCharacterEditing: <TDate extends PickerValidDate, TSection extends FieldSection>({ sections, updateSectionValue, sectionsValueBoundaries, localizedDigits, setTempAndroidValueStr, timezone, }: UseFieldEditingParams<TDate, TSection>) => {
24
24
  applyCharacterEditing: (params: ApplyCharacterEditingParams) => void;
25
25
  resetCharacterQuery: () => void;
26
26
  };
@@ -1,5 +1,5 @@
1
1
  import { UseFieldForwardedProps, UseFieldInternalProps, UseFieldParams, UseFieldState, FieldSelectedSectionsIndexes } from './useField.types';
2
- import { FieldSection, FieldSelectedSections } from '../../../models';
2
+ import { FieldSection, FieldSelectedSections, PickerValidDate } from '../../../models';
3
3
  export interface UpdateSectionValueParams<TSection extends FieldSection> {
4
4
  /**
5
5
  * The section on which we want to apply the new value.
@@ -14,7 +14,7 @@ export interface UpdateSectionValueParams<TSection extends FieldSection> {
14
14
  */
15
15
  shouldGoToNextSection: boolean;
16
16
  }
17
- export declare const useFieldState: <TValue, TDate, TSection extends FieldSection, TForwardedProps extends UseFieldForwardedProps, TInternalProps extends UseFieldInternalProps<any, any, any, any>>(params: UseFieldParams<TValue, TDate, TSection, TForwardedProps, TInternalProps>) => {
17
+ export declare const useFieldState: <TValue, TDate extends PickerValidDate, TSection extends FieldSection, TForwardedProps extends UseFieldForwardedProps, TInternalProps extends UseFieldInternalProps<any, any, any, any>>(params: UseFieldParams<TValue, TDate, TSection, TForwardedProps, TInternalProps>) => {
18
18
  state: UseFieldState<TValue, TSection>;
19
19
  selectedSectionIndexes: FieldSelectedSectionsIndexes | null;
20
20
  setSelectedSections: (newSelectedSections: FieldSelectedSections) => void;
@@ -1,5 +1,6 @@
1
1
  import * as React from 'react';
2
2
  import { UseMobilePickerParams, UseMobilePickerProps } from './useMobilePicker.types';
3
+ import { PickerValidDate } from '../../../models';
3
4
  import { DateOrTimeViewWithMeridiem } from '../../models';
4
5
  /**
5
6
  * Hook managing all the single-date mobile pickers:
@@ -7,6 +8,6 @@ import { DateOrTimeViewWithMeridiem } from '../../models';
7
8
  * - MobileDateTimePicker
8
9
  * - MobileTimePicker
9
10
  */
10
- export declare const useMobilePicker: <TDate, TView extends DateOrTimeViewWithMeridiem, TExternalProps extends UseMobilePickerProps<TDate, TView, any, TExternalProps>>({ props, getOpenDialogAriaText, ...pickerParams }: UseMobilePickerParams<TDate, TView, TExternalProps>) => {
11
+ export declare const useMobilePicker: <TDate extends PickerValidDate, TView extends DateOrTimeViewWithMeridiem, TExternalProps extends UseMobilePickerProps<TDate, TView, any, TExternalProps>>({ props, getOpenDialogAriaText, ...pickerParams }: UseMobilePickerParams<TDate, TView, TExternalProps>) => {
11
12
  renderPicker: () => React.JSX.Element;
12
13
  };
@@ -4,12 +4,12 @@ import { SlotComponentProps } from '@mui/base/utils';
4
4
  import { BaseNonStaticPickerProps, BasePickerProps, BaseNonRangeNonStaticPickerProps } from '../../models/props/basePickerProps';
5
5
  import { PickersModalDialogSlots, PickersModalDialogSlotProps } from '../../components/PickersModalDialog';
6
6
  import { UsePickerParams, UsePickerProps } from '../usePicker';
7
- import { BaseSingleInputFieldProps, FieldSection, MuiPickersAdapter } from '../../../models';
7
+ import { BaseSingleInputFieldProps, FieldSection, MuiPickersAdapter, PickerValidDate } from '../../../models';
8
8
  import { ExportedPickersLayoutSlots, ExportedPickersLayoutSlotProps, PickersLayoutSlotProps } from '../../../PickersLayout/PickersLayout.types';
9
9
  import { UsePickerValueNonStaticProps } from '../usePicker/usePickerValue.types';
10
10
  import { UsePickerViewsNonStaticProps, UsePickerViewsProps } from '../usePicker/usePickerViews';
11
11
  import { DateOrTimeViewWithMeridiem } from '../../models';
12
- export interface UseMobilePickerSlots<TDate, TView extends DateOrTimeViewWithMeridiem> extends PickersModalDialogSlots, ExportedPickersLayoutSlots<TDate | null, TDate, TView> {
12
+ export interface UseMobilePickerSlots<TDate extends PickerValidDate, TView extends DateOrTimeViewWithMeridiem> extends PickersModalDialogSlots, ExportedPickersLayoutSlots<TDate | null, TDate, TView> {
13
13
  /**
14
14
  * Component used to enter the date with the keyboard.
15
15
  */
@@ -21,15 +21,15 @@ export interface UseMobilePickerSlots<TDate, TView extends DateOrTimeViewWithMer
21
21
  */
22
22
  textField?: React.ElementType<TextFieldProps>;
23
23
  }
24
- export interface ExportedUseMobilePickerSlotProps<TDate, TView extends DateOrTimeViewWithMeridiem> extends PickersModalDialogSlotProps, ExportedPickersLayoutSlotProps<TDate | null, TDate, TView> {
24
+ export interface ExportedUseMobilePickerSlotProps<TDate extends PickerValidDate, TView extends DateOrTimeViewWithMeridiem> extends PickersModalDialogSlotProps, ExportedPickersLayoutSlotProps<TDate | null, TDate, TView> {
25
25
  field?: SlotComponentProps<React.ElementType<BaseSingleInputFieldProps<TDate | null, TDate, FieldSection, unknown>>, {}, UsePickerProps<TDate | null, TDate, any, FieldSection, any, any, any>>;
26
26
  textField?: SlotComponentProps<typeof TextField, {}, Record<string, any>>;
27
27
  }
28
- export interface UseMobilePickerSlotProps<TDate, TView extends DateOrTimeViewWithMeridiem> extends ExportedUseMobilePickerSlotProps<TDate, TView>, Pick<PickersLayoutSlotProps<TDate | null, TDate, TView>, 'toolbar'> {
28
+ export interface UseMobilePickerSlotProps<TDate extends PickerValidDate, TView extends DateOrTimeViewWithMeridiem> extends ExportedUseMobilePickerSlotProps<TDate, TView>, Pick<PickersLayoutSlotProps<TDate | null, TDate, TView>, 'toolbar'> {
29
29
  }
30
- export interface MobileOnlyPickerProps<TDate> extends BaseNonStaticPickerProps, BaseNonRangeNonStaticPickerProps, UsePickerValueNonStaticProps<TDate | null, FieldSection>, UsePickerViewsNonStaticProps {
30
+ export interface MobileOnlyPickerProps<TDate extends PickerValidDate> extends BaseNonStaticPickerProps, BaseNonRangeNonStaticPickerProps, UsePickerValueNonStaticProps<TDate | null, FieldSection>, UsePickerViewsNonStaticProps {
31
31
  }
32
- export interface UseMobilePickerProps<TDate, TView extends DateOrTimeViewWithMeridiem, TError, TExternalProps extends UsePickerViewsProps<any, any, TView, any, any>> extends BasePickerProps<TDate | null, TDate, TView, TError, TExternalProps, {}>, MobileOnlyPickerProps<TDate> {
32
+ export interface UseMobilePickerProps<TDate extends PickerValidDate, TView extends DateOrTimeViewWithMeridiem, TError, TExternalProps extends UsePickerViewsProps<any, any, TView, any, any>> extends BasePickerProps<TDate | null, TDate, TView, TError, TExternalProps, {}>, MobileOnlyPickerProps<TDate> {
33
33
  /**
34
34
  * Overridable component slots.
35
35
  * @default {}
@@ -41,7 +41,7 @@ export interface UseMobilePickerProps<TDate, TView extends DateOrTimeViewWithMer
41
41
  */
42
42
  slotProps?: UseMobilePickerSlotProps<TDate, TView>;
43
43
  }
44
- export interface UseMobilePickerParams<TDate, TView extends DateOrTimeViewWithMeridiem, TExternalProps extends UseMobilePickerProps<TDate, TView, any, TExternalProps>> extends Pick<UsePickerParams<TDate | null, TDate, TView, FieldSection, TExternalProps, {}>, 'valueManager' | 'valueType' | 'validator'> {
44
+ export interface UseMobilePickerParams<TDate extends PickerValidDate, TView extends DateOrTimeViewWithMeridiem, TExternalProps extends UseMobilePickerProps<TDate, TView, any, TExternalProps>> extends Pick<UsePickerParams<TDate | null, TDate, TView, FieldSection, TExternalProps, {}>, 'valueManager' | 'valueType' | 'validator'> {
45
45
  props: TExternalProps;
46
46
  getOpenDialogAriaText: (date: TDate | null, utils: MuiPickersAdapter<TDate>) => string;
47
47
  }
@@ -1,5 +1,5 @@
1
1
  import { UsePickerParams, UsePickerProps, UsePickerResponse } from './usePicker.types';
2
2
  import { InferError } from '../useValidation';
3
- import { FieldSection } from '../../../models';
3
+ import { FieldSection, PickerValidDate } from '../../../models';
4
4
  import { DateOrTimeViewWithMeridiem } from '../../models';
5
- export declare const usePicker: <TValue, TDate, TView extends DateOrTimeViewWithMeridiem, TSection extends FieldSection, TExternalProps extends UsePickerProps<TValue, TDate, TView, TSection, any, any, any>, TAdditionalProps extends {}>({ props, valueManager, valueType, wrapperVariant, inputRef, additionalViewProps, validator, autoFocusView, rendererInterceptor, }: UsePickerParams<TValue, TDate, TView, TSection, TExternalProps, TAdditionalProps>) => UsePickerResponse<TValue, TView, TSection, InferError<TExternalProps>>;
5
+ export declare const usePicker: <TValue, TDate extends PickerValidDate, TView extends DateOrTimeViewWithMeridiem, TSection extends FieldSection, TExternalProps extends UsePickerProps<TValue, TDate, TView, TSection, any, any, any>, TAdditionalProps extends {}>({ props, valueManager, valueType, wrapperVariant, inputRef, additionalViewProps, validator, autoFocusView, rendererInterceptor, }: UsePickerParams<TValue, TDate, TView, TSection, TExternalProps, TAdditionalProps>) => UsePickerResponse<TValue, TView, TSection, InferError<TExternalProps>>;