@mui/x-date-pickers 7.22.1 → 8.0.0-alpha.0

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 (498) hide show
  1. package/AdapterDateFns/AdapterDateFns.d.ts +1 -1
  2. package/AdapterDateFnsBase/AdapterDateFnsBase.d.ts +3 -3
  3. package/AdapterDateFnsJalali/AdapterDateFnsJalali.d.ts +1 -1
  4. package/AdapterDateFnsJalaliV3/AdapterDateFnsJalaliV3.d.ts +1 -1
  5. package/AdapterDateFnsV3/AdapterDateFnsV3.d.ts +1 -1
  6. package/AdapterDayjs/AdapterDayjs.d.ts +2 -2
  7. package/AdapterLuxon/AdapterLuxon.d.ts +2 -2
  8. package/AdapterMoment/AdapterMoment.d.ts +2 -2
  9. package/AdapterMomentHijri/AdapterMomentHijri.d.ts +2 -2
  10. package/AdapterMomentJalaali/AdapterMomentJalaali.d.ts +2 -2
  11. package/CHANGELOG.md +143 -92
  12. package/DateCalendar/DateCalendar.d.ts +1 -2
  13. package/DateCalendar/DateCalendar.js +20 -22
  14. package/DateCalendar/DateCalendar.types.d.ts +21 -31
  15. package/DateCalendar/DayCalendar.d.ts +25 -24
  16. package/DateCalendar/DayCalendar.js +13 -10
  17. package/DateCalendar/index.d.ts +1 -0
  18. package/DateCalendar/useCalendarState.d.ts +16 -16
  19. package/DateCalendar/useIsDateDisabled.d.ts +2 -2
  20. package/DateField/DateField.d.ts +1 -2
  21. package/DateField/DateField.js +8 -10
  22. package/DateField/DateField.types.d.ts +8 -9
  23. package/DateField/index.d.ts +1 -1
  24. package/DateField/useDateField.d.ts +1 -2
  25. package/DatePicker/DatePicker.d.ts +1 -2
  26. package/DatePicker/DatePicker.js +15 -14
  27. package/DatePicker/DatePicker.types.d.ts +10 -11
  28. package/DatePicker/DatePickerToolbar.d.ts +2 -2
  29. package/DatePicker/DatePickerToolbar.js +12 -2
  30. package/DatePicker/shared.d.ts +11 -11
  31. package/DateTimeField/DateTimeField.d.ts +1 -2
  32. package/DateTimeField/DateTimeField.js +9 -12
  33. package/DateTimeField/DateTimeField.types.d.ts +9 -14
  34. package/DateTimeField/index.d.ts +1 -1
  35. package/DateTimeField/useDateTimeField.d.ts +1 -2
  36. package/DateTimePicker/DateTimePicker.d.ts +1 -2
  37. package/DateTimePicker/DateTimePicker.js +16 -16
  38. package/DateTimePicker/DateTimePicker.types.d.ts +10 -13
  39. package/DateTimePicker/DateTimePickerTabs.d.ts +1 -2
  40. package/DateTimePicker/DateTimePickerTabs.js +2 -2
  41. package/DateTimePicker/DateTimePickerToolbar.d.ts +3 -3
  42. package/DateTimePicker/DateTimePickerToolbar.js +12 -2
  43. package/DateTimePicker/shared.d.ts +12 -12
  44. package/DesktopDatePicker/DesktopDatePicker.d.ts +1 -2
  45. package/DesktopDatePicker/DesktopDatePicker.js +17 -16
  46. package/DesktopDatePicker/DesktopDatePicker.types.d.ts +7 -7
  47. package/DesktopDateTimePicker/DesktopDateTimePicker.d.ts +1 -2
  48. package/DesktopDateTimePicker/DesktopDateTimePicker.js +18 -18
  49. package/DesktopDateTimePicker/DesktopDateTimePicker.types.d.ts +8 -8
  50. package/DesktopDateTimePicker/DesktopDateTimePickerLayout.d.ts +1 -2
  51. package/DesktopDateTimePicker/DesktopDateTimePickerLayout.js +10 -0
  52. package/DesktopTimePicker/DesktopTimePicker.d.ts +1 -2
  53. package/DesktopTimePicker/DesktopTimePicker.js +11 -6
  54. package/DesktopTimePicker/DesktopTimePicker.types.d.ts +8 -8
  55. package/DigitalClock/DigitalClock.d.ts +1 -2
  56. package/DigitalClock/DigitalClock.js +7 -6
  57. package/DigitalClock/DigitalClock.types.d.ts +4 -4
  58. package/LocalizationProvider/LocalizationProvider.d.ts +12 -12
  59. package/MobileDatePicker/MobileDatePicker.d.ts +1 -2
  60. package/MobileDatePicker/MobileDatePicker.js +17 -16
  61. package/MobileDatePicker/MobileDatePicker.types.d.ts +7 -7
  62. package/MobileDateTimePicker/MobileDateTimePicker.d.ts +2 -2
  63. package/MobileDateTimePicker/MobileDateTimePicker.js +18 -18
  64. package/MobileDateTimePicker/MobileDateTimePicker.types.d.ts +7 -7
  65. package/MobileTimePicker/MobileTimePicker.d.ts +2 -2
  66. package/MobileTimePicker/MobileTimePicker.js +11 -6
  67. package/MobileTimePicker/MobileTimePicker.types.d.ts +7 -7
  68. package/MonthCalendar/MonthCalendar.d.ts +3 -4
  69. package/MonthCalendar/MonthCalendar.js +17 -14
  70. package/MonthCalendar/MonthCalendar.types.d.ts +14 -15
  71. package/MonthCalendar/PickersMonth.js +17 -13
  72. package/MultiSectionDigitalClock/MultiSectionDigitalClock.d.ts +1 -2
  73. package/MultiSectionDigitalClock/MultiSectionDigitalClock.js +7 -6
  74. package/MultiSectionDigitalClock/MultiSectionDigitalClock.types.d.ts +3 -4
  75. package/MultiSectionDigitalClock/MultiSectionDigitalClock.utils.d.ts +9 -9
  76. package/MultiSectionDigitalClock/MultiSectionDigitalClockSection.d.ts +2 -3
  77. package/PickersActionBar/PickersActionBar.js +2 -2
  78. package/PickersCalendarHeader/PickersCalendarHeader.d.ts +1 -2
  79. package/PickersCalendarHeader/PickersCalendarHeader.js +2 -2
  80. package/PickersCalendarHeader/PickersCalendarHeader.types.d.ts +9 -9
  81. package/PickersDay/PickersDay.d.ts +8 -8
  82. package/PickersLayout/PickersLayout.d.ts +2 -3
  83. package/PickersLayout/PickersLayout.js +10 -0
  84. package/PickersLayout/PickersLayout.types.d.ts +14 -17
  85. package/PickersLayout/index.d.ts +1 -1
  86. package/PickersLayout/usePickerLayout.d.ts +1 -2
  87. package/PickersLayout/usePickerLayout.js +17 -18
  88. package/README.md +2 -2
  89. package/StaticDatePicker/StaticDatePicker.d.ts +1 -2
  90. package/StaticDatePicker/StaticDatePicker.js +14 -13
  91. package/StaticDatePicker/StaticDatePicker.types.d.ts +7 -7
  92. package/StaticDateTimePicker/StaticDateTimePicker.d.ts +1 -2
  93. package/StaticDateTimePicker/StaticDateTimePicker.js +15 -15
  94. package/StaticDateTimePicker/StaticDateTimePicker.types.d.ts +7 -7
  95. package/StaticTimePicker/StaticTimePicker.d.ts +1 -2
  96. package/StaticTimePicker/StaticTimePicker.js +8 -3
  97. package/StaticTimePicker/StaticTimePicker.types.d.ts +7 -7
  98. package/TimeClock/Clock.d.ts +4 -5
  99. package/TimeClock/Clock.js +3 -3
  100. package/TimeClock/ClockNumbers.d.ts +5 -5
  101. package/TimeClock/TimeClock.d.ts +1 -2
  102. package/TimeClock/TimeClock.js +7 -6
  103. package/TimeClock/TimeClock.types.d.ts +4 -4
  104. package/TimeField/TimeField.d.ts +1 -2
  105. package/TimeField/TimeField.js +6 -6
  106. package/TimeField/TimeField.types.d.ts +9 -14
  107. package/TimeField/index.d.ts +1 -1
  108. package/TimeField/useTimeField.d.ts +1 -2
  109. package/TimePicker/TimePicker.d.ts +1 -2
  110. package/TimePicker/TimePicker.js +9 -4
  111. package/TimePicker/TimePicker.types.d.ts +10 -13
  112. package/TimePicker/TimePickerToolbar.d.ts +2 -2
  113. package/TimePicker/TimePickerToolbar.js +12 -2
  114. package/TimePicker/shared.d.ts +10 -10
  115. package/YearCalendar/PickersYear.js +17 -13
  116. package/YearCalendar/YearCalendar.d.ts +1 -2
  117. package/YearCalendar/YearCalendar.js +17 -14
  118. package/YearCalendar/YearCalendar.types.d.ts +14 -15
  119. package/dateViewRenderers/dateViewRenderers.d.ts +3 -3
  120. package/hooks/index.d.ts +2 -2
  121. package/hooks/index.js +2 -2
  122. package/hooks/useClearableField.js +4 -3
  123. package/hooks/useParsedFormat.d.ts +2 -3
  124. package/hooks/useParsedFormat.js +2 -2
  125. package/hooks/usePickerContext.d.ts +4 -0
  126. package/hooks/usePickerContext.js +15 -0
  127. package/hooks/usePickerTranslations.d.ts +1 -0
  128. package/{modern/hooks/usePickersTranslations.js → hooks/usePickerTranslations.js} +1 -1
  129. package/index.js +1 -1
  130. package/internals/components/{PickersProvider.d.ts → PickerProvider.d.ts} +15 -8
  131. package/internals/components/PickerProvider.js +38 -0
  132. package/internals/hooks/date-helpers-hooks.d.ts +6 -6
  133. package/internals/hooks/defaultizedFieldProps.d.ts +7 -8
  134. package/internals/hooks/useClockReferenceDate.d.ts +5 -5
  135. package/internals/hooks/useDesktopPicker/useDesktopPicker.d.ts +1 -2
  136. package/internals/hooks/useDesktopPicker/useDesktopPicker.js +21 -17
  137. package/internals/hooks/useDesktopPicker/useDesktopPicker.types.d.ts +15 -15
  138. package/internals/hooks/useField/buildSectionsFromFormat.d.ts +5 -5
  139. package/internals/hooks/useField/useField.d.ts +3 -3
  140. package/internals/hooks/useField/useField.js +1 -1
  141. package/internals/hooks/useField/useField.types.d.ts +38 -48
  142. package/internals/hooks/useField/useField.utils.d.ts +13 -13
  143. package/internals/hooks/useField/useField.utils.js +2 -1
  144. package/internals/hooks/useField/useFieldCharacterEditing.d.ts +4 -4
  145. package/internals/hooks/useField/useFieldState.d.ts +4 -4
  146. package/internals/hooks/useField/useFieldState.js +3 -3
  147. package/internals/hooks/useField/useFieldV7TextField.js +2 -2
  148. package/internals/hooks/useMobilePicker/useMobilePicker.d.ts +1 -2
  149. package/internals/hooks/useMobilePicker/useMobilePicker.js +23 -18
  150. package/internals/hooks/useMobilePicker/useMobilePicker.types.d.ts +12 -12
  151. package/internals/hooks/usePicker/usePicker.d.ts +2 -2
  152. package/internals/hooks/usePicker/usePicker.js +12 -4
  153. package/internals/hooks/usePicker/usePicker.types.d.ts +7 -5
  154. package/internals/hooks/usePicker/usePickerLayoutProps.d.ts +2 -3
  155. package/internals/hooks/usePicker/usePickerOwnerState.d.ts +4 -3
  156. package/internals/hooks/usePicker/usePickerOwnerState.js +9 -6
  157. package/internals/hooks/usePicker/usePickerProvider.d.ts +10 -0
  158. package/internals/hooks/usePicker/usePickerProvider.js +21 -0
  159. package/internals/hooks/usePicker/usePickerValue.d.ts +2 -2
  160. package/internals/hooks/usePicker/usePickerValue.js +2 -7
  161. package/internals/hooks/usePicker/usePickerValue.types.d.ts +32 -34
  162. package/internals/hooks/usePicker/usePickerViews.d.ts +6 -11
  163. package/internals/hooks/usePickerPrivateContext.d.ts +4 -0
  164. package/internals/hooks/usePickerPrivateContext.js +9 -0
  165. package/internals/hooks/useStaticPicker/useStaticPicker.d.ts +1 -2
  166. package/internals/hooks/useStaticPicker/useStaticPicker.js +5 -4
  167. package/internals/hooks/useStaticPicker/useStaticPicker.types.d.ts +6 -6
  168. package/internals/hooks/useUtils.d.ts +7 -7
  169. package/internals/hooks/useValueWithTimezone.d.ts +5 -5
  170. package/internals/hooks/useViews.d.ts +3 -3
  171. package/internals/hooks/useViews.js +1 -1
  172. package/internals/index.d.ts +6 -4
  173. package/internals/index.js +2 -1
  174. package/internals/models/fields.d.ts +32 -7
  175. package/internals/models/formProps.d.ts +14 -0
  176. package/internals/models/helpers.d.ts +0 -4
  177. package/internals/models/index.d.ts +2 -0
  178. package/internals/models/index.js +3 -1
  179. package/internals/models/props/basePickerProps.d.ts +5 -6
  180. package/internals/models/props/{clock.d.ts → time.d.ts} +10 -17
  181. package/internals/models/props/toolbar.d.ts +2 -3
  182. package/internals/models/validation.d.ts +21 -25
  183. package/internals/models/value.d.ts +3 -0
  184. package/internals/models/value.js +1 -0
  185. package/internals/utils/date-time-utils.d.ts +7 -7
  186. package/internals/utils/date-utils.d.ts +16 -16
  187. package/internals/utils/getDefaultReferenceDate.d.ts +10 -10
  188. package/internals/utils/time-utils.d.ts +5 -5
  189. package/internals/utils/valueManagers.d.ts +3 -3
  190. package/locales/beBY.d.ts +3 -3
  191. package/locales/beBY.js +3 -3
  192. package/locales/bgBG.d.ts +3 -3
  193. package/locales/bgBG.js +3 -3
  194. package/locales/caES.d.ts +3 -3
  195. package/locales/caES.js +3 -3
  196. package/locales/csCZ.d.ts +3 -3
  197. package/locales/csCZ.js +3 -3
  198. package/locales/daDK.d.ts +3 -3
  199. package/locales/daDK.js +3 -3
  200. package/locales/deDE.d.ts +3 -3
  201. package/locales/deDE.js +3 -3
  202. package/locales/elGR.d.ts +3 -3
  203. package/locales/elGR.js +12 -13
  204. package/locales/enUS.d.ts +4 -4
  205. package/locales/enUS.js +3 -3
  206. package/locales/esES.d.ts +3 -3
  207. package/locales/esES.js +3 -3
  208. package/locales/eu.d.ts +3 -3
  209. package/locales/eu.js +3 -3
  210. package/locales/faIR.d.ts +3 -3
  211. package/locales/faIR.js +3 -3
  212. package/locales/fiFI.d.ts +3 -3
  213. package/locales/fiFI.js +3 -3
  214. package/locales/frFR.d.ts +3 -3
  215. package/locales/frFR.js +3 -3
  216. package/locales/heIL.d.ts +3 -3
  217. package/locales/heIL.js +3 -3
  218. package/locales/hrHR.d.ts +3 -3
  219. package/locales/hrHR.js +3 -3
  220. package/locales/huHU.d.ts +3 -3
  221. package/locales/huHU.js +3 -3
  222. package/locales/isIS.d.ts +3 -3
  223. package/locales/isIS.js +3 -3
  224. package/locales/itIT.d.ts +3 -3
  225. package/locales/itIT.js +3 -3
  226. package/locales/jaJP.d.ts +3 -3
  227. package/locales/jaJP.js +3 -3
  228. package/locales/koKR.d.ts +3 -3
  229. package/locales/koKR.js +3 -3
  230. package/locales/kzKZ.d.ts +3 -3
  231. package/locales/kzKZ.js +3 -3
  232. package/locales/mk.d.ts +3 -3
  233. package/locales/mk.js +3 -3
  234. package/locales/nbNO.d.ts +3 -3
  235. package/locales/nbNO.js +3 -3
  236. package/locales/nlNL.d.ts +3 -3
  237. package/locales/nlNL.js +3 -3
  238. package/locales/nnNO.d.ts +3 -3
  239. package/locales/nnNO.js +3 -3
  240. package/locales/plPL.d.ts +3 -3
  241. package/locales/plPL.js +3 -3
  242. package/locales/ptBR.d.ts +3 -3
  243. package/locales/ptBR.js +5 -3
  244. package/locales/ptPT.d.ts +3 -3
  245. package/locales/ptPT.js +3 -3
  246. package/locales/roRO.d.ts +3 -3
  247. package/locales/roRO.js +3 -3
  248. package/locales/ruRU.d.ts +3 -3
  249. package/locales/ruRU.js +3 -3
  250. package/locales/skSK.d.ts +3 -3
  251. package/locales/skSK.js +3 -3
  252. package/locales/svSE.d.ts +3 -3
  253. package/locales/svSE.js +3 -3
  254. package/locales/trTR.d.ts +3 -3
  255. package/locales/trTR.js +3 -3
  256. package/locales/ukUA.d.ts +3 -3
  257. package/locales/ukUA.js +3 -3
  258. package/locales/urPK.d.ts +3 -3
  259. package/locales/urPK.js +3 -3
  260. package/locales/utils/getPickersLocalization.d.ts +9 -9
  261. package/locales/utils/getPickersLocalization.js +1 -1
  262. package/locales/utils/pickersLocaleTextApi.d.ts +12 -36
  263. package/locales/viVN.d.ts +3 -3
  264. package/locales/viVN.js +3 -3
  265. package/locales/zhCN.d.ts +3 -3
  266. package/locales/zhCN.js +3 -3
  267. package/locales/zhHK.d.ts +3 -3
  268. package/locales/zhHK.js +3 -3
  269. package/models/adapters.d.ts +151 -202
  270. package/models/fields.d.ts +9 -41
  271. package/models/pickers.d.ts +10 -6
  272. package/modern/DateCalendar/DateCalendar.js +20 -22
  273. package/modern/DateCalendar/DayCalendar.js +13 -10
  274. package/modern/DateField/DateField.js +8 -10
  275. package/modern/DatePicker/DatePicker.js +15 -14
  276. package/modern/DatePicker/DatePickerToolbar.js +12 -2
  277. package/modern/DateTimeField/DateTimeField.js +9 -12
  278. package/modern/DateTimePicker/DateTimePicker.js +16 -16
  279. package/modern/DateTimePicker/DateTimePickerTabs.js +2 -2
  280. package/modern/DateTimePicker/DateTimePickerToolbar.js +12 -2
  281. package/modern/DesktopDatePicker/DesktopDatePicker.js +17 -16
  282. package/modern/DesktopDateTimePicker/DesktopDateTimePicker.js +18 -18
  283. package/modern/DesktopDateTimePicker/DesktopDateTimePickerLayout.js +10 -0
  284. package/modern/DesktopTimePicker/DesktopTimePicker.js +11 -6
  285. package/modern/DigitalClock/DigitalClock.js +7 -6
  286. package/modern/MobileDatePicker/MobileDatePicker.js +17 -16
  287. package/modern/MobileDateTimePicker/MobileDateTimePicker.js +18 -18
  288. package/modern/MobileTimePicker/MobileTimePicker.js +11 -6
  289. package/modern/MonthCalendar/MonthCalendar.js +17 -14
  290. package/modern/MonthCalendar/PickersMonth.js +17 -13
  291. package/modern/MultiSectionDigitalClock/MultiSectionDigitalClock.js +7 -6
  292. package/modern/PickersActionBar/PickersActionBar.js +2 -2
  293. package/modern/PickersCalendarHeader/PickersCalendarHeader.js +2 -2
  294. package/modern/PickersLayout/PickersLayout.js +10 -0
  295. package/modern/PickersLayout/usePickerLayout.js +17 -18
  296. package/modern/StaticDatePicker/StaticDatePicker.js +14 -13
  297. package/modern/StaticDateTimePicker/StaticDateTimePicker.js +15 -15
  298. package/modern/StaticTimePicker/StaticTimePicker.js +8 -3
  299. package/modern/TimeClock/Clock.js +3 -3
  300. package/modern/TimeClock/TimeClock.js +7 -6
  301. package/modern/TimeField/TimeField.js +6 -6
  302. package/modern/TimePicker/TimePicker.js +9 -4
  303. package/modern/TimePicker/TimePickerToolbar.js +12 -2
  304. package/modern/YearCalendar/PickersYear.js +17 -13
  305. package/modern/YearCalendar/YearCalendar.js +17 -14
  306. package/modern/hooks/index.js +2 -2
  307. package/modern/hooks/useClearableField.js +4 -3
  308. package/modern/hooks/useParsedFormat.js +2 -2
  309. package/modern/hooks/usePickerContext.js +15 -0
  310. package/{hooks/usePickersTranslations.js → modern/hooks/usePickerTranslations.js} +1 -1
  311. package/modern/index.js +1 -1
  312. package/modern/internals/components/PickerProvider.js +38 -0
  313. package/modern/internals/hooks/useDesktopPicker/useDesktopPicker.js +21 -17
  314. package/modern/internals/hooks/useField/useField.js +1 -1
  315. package/modern/internals/hooks/useField/useField.utils.js +2 -1
  316. package/modern/internals/hooks/useField/useFieldState.js +3 -3
  317. package/modern/internals/hooks/useField/useFieldV7TextField.js +2 -2
  318. package/modern/internals/hooks/useMobilePicker/useMobilePicker.js +23 -18
  319. package/modern/internals/hooks/usePicker/usePicker.js +12 -4
  320. package/modern/internals/hooks/usePicker/usePickerOwnerState.js +9 -6
  321. package/modern/internals/hooks/usePicker/usePickerProvider.js +21 -0
  322. package/modern/internals/hooks/usePicker/usePickerValue.js +2 -7
  323. package/modern/internals/hooks/usePickerPrivateContext.js +9 -0
  324. package/modern/internals/hooks/useStaticPicker/useStaticPicker.js +5 -4
  325. package/modern/internals/hooks/useViews.js +1 -1
  326. package/modern/internals/index.js +2 -1
  327. package/modern/internals/models/formProps.js +1 -0
  328. package/modern/internals/models/index.js +3 -1
  329. package/modern/internals/models/props/time.js +1 -0
  330. package/modern/internals/models/value.js +1 -0
  331. package/modern/locales/beBY.js +3 -3
  332. package/modern/locales/bgBG.js +3 -3
  333. package/modern/locales/caES.js +3 -3
  334. package/modern/locales/csCZ.js +3 -3
  335. package/modern/locales/daDK.js +3 -3
  336. package/modern/locales/deDE.js +3 -3
  337. package/modern/locales/elGR.js +12 -13
  338. package/modern/locales/enUS.js +3 -3
  339. package/modern/locales/esES.js +3 -3
  340. package/modern/locales/eu.js +3 -3
  341. package/modern/locales/faIR.js +3 -3
  342. package/modern/locales/fiFI.js +3 -3
  343. package/modern/locales/frFR.js +3 -3
  344. package/modern/locales/heIL.js +3 -3
  345. package/modern/locales/hrHR.js +3 -3
  346. package/modern/locales/huHU.js +3 -3
  347. package/modern/locales/isIS.js +3 -3
  348. package/modern/locales/itIT.js +3 -3
  349. package/modern/locales/jaJP.js +3 -3
  350. package/modern/locales/koKR.js +3 -3
  351. package/modern/locales/kzKZ.js +3 -3
  352. package/modern/locales/mk.js +3 -3
  353. package/modern/locales/nbNO.js +3 -3
  354. package/modern/locales/nlNL.js +3 -3
  355. package/modern/locales/nnNO.js +3 -3
  356. package/modern/locales/plPL.js +3 -3
  357. package/modern/locales/ptBR.js +5 -3
  358. package/modern/locales/ptPT.js +3 -3
  359. package/modern/locales/roRO.js +3 -3
  360. package/modern/locales/ruRU.js +3 -3
  361. package/modern/locales/skSK.js +3 -3
  362. package/modern/locales/svSE.js +3 -3
  363. package/modern/locales/trTR.js +3 -3
  364. package/modern/locales/ukUA.js +3 -3
  365. package/modern/locales/urPK.js +3 -3
  366. package/modern/locales/utils/getPickersLocalization.js +1 -1
  367. package/modern/locales/viVN.js +3 -3
  368. package/modern/locales/zhCN.js +3 -3
  369. package/modern/locales/zhHK.js +3 -3
  370. package/modern/validation/useValidation.js +2 -3
  371. package/modern/validation/validateDate.js +5 -0
  372. package/modern/validation/validateDateTime.js +5 -0
  373. package/modern/validation/validateTime.js +5 -0
  374. package/node/DateCalendar/DateCalendar.js +20 -22
  375. package/node/DateCalendar/DayCalendar.js +13 -10
  376. package/node/DateField/DateField.js +8 -10
  377. package/node/DatePicker/DatePicker.js +15 -14
  378. package/node/DatePicker/DatePickerToolbar.js +12 -2
  379. package/node/DateTimeField/DateTimeField.js +9 -12
  380. package/node/DateTimePicker/DateTimePicker.js +16 -16
  381. package/node/DateTimePicker/DateTimePickerTabs.js +2 -2
  382. package/node/DateTimePicker/DateTimePickerToolbar.js +12 -2
  383. package/node/DesktopDatePicker/DesktopDatePicker.js +17 -16
  384. package/node/DesktopDateTimePicker/DesktopDateTimePicker.js +18 -18
  385. package/node/DesktopDateTimePicker/DesktopDateTimePickerLayout.js +10 -0
  386. package/node/DesktopTimePicker/DesktopTimePicker.js +11 -6
  387. package/node/DigitalClock/DigitalClock.js +7 -6
  388. package/node/MobileDatePicker/MobileDatePicker.js +17 -16
  389. package/node/MobileDateTimePicker/MobileDateTimePicker.js +18 -18
  390. package/node/MobileTimePicker/MobileTimePicker.js +11 -6
  391. package/node/MonthCalendar/MonthCalendar.js +17 -14
  392. package/node/MonthCalendar/PickersMonth.js +17 -13
  393. package/node/MultiSectionDigitalClock/MultiSectionDigitalClock.js +7 -6
  394. package/node/PickersActionBar/PickersActionBar.js +2 -2
  395. package/node/PickersCalendarHeader/PickersCalendarHeader.js +2 -2
  396. package/node/PickersLayout/PickersLayout.js +10 -0
  397. package/node/PickersLayout/usePickerLayout.js +17 -18
  398. package/node/StaticDatePicker/StaticDatePicker.js +14 -13
  399. package/node/StaticDateTimePicker/StaticDateTimePicker.js +15 -15
  400. package/node/StaticTimePicker/StaticTimePicker.js +8 -3
  401. package/node/TimeClock/Clock.js +3 -3
  402. package/node/TimeClock/TimeClock.js +7 -6
  403. package/node/TimeField/TimeField.js +6 -6
  404. package/node/TimePicker/TimePicker.js +9 -4
  405. package/node/TimePicker/TimePickerToolbar.js +12 -2
  406. package/node/YearCalendar/PickersYear.js +17 -13
  407. package/node/YearCalendar/YearCalendar.js +17 -14
  408. package/node/hooks/index.js +6 -6
  409. package/node/hooks/useClearableField.js +4 -3
  410. package/node/hooks/useParsedFormat.js +2 -2
  411. package/node/hooks/usePickerContext.js +21 -0
  412. package/node/hooks/usePickerTranslations.js +10 -0
  413. package/node/index.js +1 -1
  414. package/node/internals/components/PickerProvider.js +46 -0
  415. package/node/internals/hooks/useDesktopPicker/useDesktopPicker.js +21 -17
  416. package/node/internals/hooks/useField/useField.js +1 -1
  417. package/node/internals/hooks/useField/useField.utils.js +2 -1
  418. package/node/internals/hooks/useField/useFieldState.js +3 -3
  419. package/node/internals/hooks/useField/useFieldV7TextField.js +2 -2
  420. package/node/internals/hooks/useMobilePicker/useMobilePicker.js +23 -18
  421. package/node/internals/hooks/usePicker/usePicker.js +12 -4
  422. package/node/internals/hooks/usePicker/usePickerOwnerState.js +9 -6
  423. package/node/internals/hooks/usePicker/usePickerProvider.js +28 -0
  424. package/node/internals/hooks/usePicker/usePickerValue.js +1 -7
  425. package/node/internals/hooks/usePickerPrivateContext.js +15 -0
  426. package/node/internals/hooks/useStaticPicker/useStaticPicker.js +5 -4
  427. package/node/internals/hooks/useViews.js +3 -3
  428. package/node/internals/index.js +14 -7
  429. package/node/internals/models/index.js +22 -0
  430. package/node/internals/models/props/time.js +5 -0
  431. package/node/internals/models/value.js +5 -0
  432. package/node/locales/beBY.js +3 -3
  433. package/node/locales/bgBG.js +3 -3
  434. package/node/locales/caES.js +3 -3
  435. package/node/locales/csCZ.js +3 -3
  436. package/node/locales/daDK.js +3 -3
  437. package/node/locales/deDE.js +3 -3
  438. package/node/locales/elGR.js +12 -13
  439. package/node/locales/enUS.js +3 -3
  440. package/node/locales/esES.js +3 -3
  441. package/node/locales/eu.js +3 -3
  442. package/node/locales/faIR.js +3 -3
  443. package/node/locales/fiFI.js +3 -3
  444. package/node/locales/frFR.js +3 -3
  445. package/node/locales/heIL.js +3 -3
  446. package/node/locales/hrHR.js +3 -3
  447. package/node/locales/huHU.js +3 -3
  448. package/node/locales/isIS.js +3 -3
  449. package/node/locales/itIT.js +3 -3
  450. package/node/locales/jaJP.js +3 -3
  451. package/node/locales/koKR.js +3 -3
  452. package/node/locales/kzKZ.js +3 -3
  453. package/node/locales/mk.js +3 -3
  454. package/node/locales/nbNO.js +3 -3
  455. package/node/locales/nlNL.js +3 -3
  456. package/node/locales/nnNO.js +3 -3
  457. package/node/locales/plPL.js +3 -3
  458. package/node/locales/ptBR.js +5 -3
  459. package/node/locales/ptPT.js +3 -3
  460. package/node/locales/roRO.js +3 -3
  461. package/node/locales/ruRU.js +3 -3
  462. package/node/locales/skSK.js +3 -3
  463. package/node/locales/svSE.js +3 -3
  464. package/node/locales/trTR.js +3 -3
  465. package/node/locales/ukUA.js +3 -3
  466. package/node/locales/urPK.js +3 -3
  467. package/node/locales/utils/getPickersLocalization.js +1 -1
  468. package/node/locales/viVN.js +3 -3
  469. package/node/locales/zhCN.js +3 -3
  470. package/node/locales/zhHK.js +3 -3
  471. package/node/validation/useValidation.js +2 -3
  472. package/node/validation/validateDate.js +4 -0
  473. package/node/validation/validateDateTime.js +4 -0
  474. package/node/validation/validateTime.js +4 -0
  475. package/package.json +4 -4
  476. package/themeAugmentation/props.d.ts +28 -28
  477. package/timeViewRenderers/timeViewRenderers.d.ts +6 -6
  478. package/validation/extractValidationProps.d.ts +4 -4
  479. package/validation/useValidation.d.ts +9 -10
  480. package/validation/useValidation.js +2 -3
  481. package/validation/validateDate.d.ts +7 -2
  482. package/validation/validateDate.js +5 -0
  483. package/validation/validateDateTime.d.ts +10 -4
  484. package/validation/validateDateTime.js +5 -0
  485. package/validation/validateTime.d.ts +7 -2
  486. package/validation/validateTime.js +5 -0
  487. package/hooks/usePickersContext.d.ts +0 -4
  488. package/hooks/usePickersContext.js +0 -15
  489. package/hooks/usePickersTranslations.d.ts +0 -2
  490. package/internals/components/PickersProvider.js +0 -26
  491. package/modern/hooks/usePickersContext.js +0 -15
  492. package/modern/internals/components/PickersProvider.js +0 -26
  493. package/node/hooks/usePickersContext.js +0 -21
  494. package/node/hooks/usePickersTranslations.js +0 -10
  495. package/node/internals/components/PickersProvider.js +0 -34
  496. /package/internals/models/{props/clock.js → formProps.js} +0 -0
  497. /package/{modern/internals/models/props/clock.js → internals/models/props/time.js} +0 -0
  498. /package/node/internals/models/{props/clock.js → formProps.js} +0 -0
@@ -140,8 +140,8 @@ export type AdapterOptions<TLocale, TInstance> = {
140
140
  formats?: Partial<AdapterFormats>;
141
141
  locale?: TLocale;
142
142
  } & PropertyIfNotNever<'instance', TInstance>;
143
- export type DateBuilderReturnType<T extends string | null | undefined, TDate> = [T] extends [null] ? null : TDate;
144
- export interface MuiPickersAdapter<TDate extends PickerValidDate, TLocale = any> {
143
+ export type DateBuilderReturnType<T extends string | null | undefined> = [T] extends [null] ? null : PickerValidDate;
144
+ export interface MuiPickersAdapter<TLocale = any> {
145
145
  /**
146
146
  * A boolean confirming that the adapter used is an MUI adapter.
147
147
  */
@@ -168,46 +168,42 @@ export interface MuiPickersAdapter<TDate extends PickerValidDate, TLocale = any>
168
168
  * Create a date in the date library format.
169
169
  * If no `value` parameter is provided, creates a date with the current timestamp.
170
170
  * If a `value` parameter is provided, pass it to the date library to try to parse it.
171
- * @template TDate
172
171
  * @param {string | null | undefined} value The optional value to parse.
173
172
  * @param {PickersTimezone} timezone The timezone of the date. Default: "default"
174
- * @returns {TDate | null} The parsed date.
173
+ * @returns {PickerValidDate | null} The parsed date.
175
174
  */
176
- date<T extends string | null | undefined>(value?: T, timezone?: PickersTimezone): DateBuilderReturnType<T, TDate>;
175
+ date<T extends string | null | undefined>(value?: T, timezone?: PickersTimezone): DateBuilderReturnType<T>;
177
176
  /**
178
177
  * Creates an invalid date in the date library format.
179
- * @returns {TDate} The invalid date.
178
+ * @returns {PickerValidDate} The invalid date.
180
179
  */
181
- getInvalidDate(): TDate;
180
+ getInvalidDate(): PickerValidDate;
182
181
  /**
183
182
  * Extracts the timezone from a date.
184
- * @template TDate
185
- * @param {TDate} value The date from which we want to get the timezone.
183
+ * @param {PickerValidDate | null} value The date from which we want to get the timezone.
184
+ * @returns {PickerValidDate} The timezone of the date.
186
185
  */
187
- getTimezone(value: TDate | null): string;
186
+ getTimezone(value: PickerValidDate | null): PickersTimezone;
188
187
  /**
189
188
  * Convert a date to another timezone.
190
- * @template TDate
191
- * @param {TDate} value The date to convert.
189
+ * @param {PickerValidDate} value The date to convert.
192
190
  * @param {PickersTimezone} timezone The timezone to convert the date to.
193
- * @returns {TDate} The converted date.
191
+ * @returns {PickerValidDate} The converted date.
194
192
  */
195
- setTimezone(value: TDate, timezone: PickersTimezone): TDate;
193
+ setTimezone(value: PickerValidDate, timezone: PickersTimezone): PickerValidDate;
196
194
  /**
197
195
  * Convert a date in the library format into a JavaScript `Date` object.
198
- * @template TDate
199
- * @param {TDate} value The value to convert.
200
- * @returns {Date} the JavaScript date.
196
+ * @param {PickerValidDate} value The value to convert.
197
+ * @returns {PickerValidDate} the JavaScript date.
201
198
  */
202
- toJsDate(value: TDate): Date;
199
+ toJsDate(value: PickerValidDate): Date;
203
200
  /**
204
201
  * Parse a string date in a specific format.
205
- * @template TDate
206
202
  * @param {string} value The string date to parse.
207
203
  * @param {string} format The format in which the string date is.
208
- * @returns {TDate | null} The parsed date.
204
+ * @returns {PickerValidDate | null} The parsed date.
209
205
  */
210
- parse(value: string, format: string): TDate | null;
206
+ parse(value: string, format: string): PickerValidDate | null;
211
207
  /**
212
208
  * Get the code of the locale currently used by the adapter.
213
209
  * @returns {string} The code of the locale.
@@ -226,26 +222,24 @@ export interface MuiPickersAdapter<TDate extends PickerValidDate, TLocale = any>
226
222
  expandFormat(format: string): string;
227
223
  /**
228
224
  * Check if the date is valid.
229
- * @param {TDate | null} value The value to test.
225
+ * @param {PickerValidDate | null} value The value to test.
230
226
  * @returns {boolean} `true` if the value is a valid date according to the date library.
231
227
  */
232
- isValid(value: TDate | null): boolean;
228
+ isValid(value: PickerValidDate | null): boolean;
233
229
  /**
234
230
  * Format a date using an adapter format string (see the `AdapterFormats` interface)
235
- * @template TDate
236
- * @param {TDate} value The date to format.
231
+ * @param {PickerValidDate} value The date to format.
237
232
  * @param {keyof AdapterFormats} formatKey The formatKey to use.
238
233
  * @returns {string} The stringify date.
239
234
  */
240
- format(value: TDate, formatKey: keyof AdapterFormats): string;
235
+ format(value: PickerValidDate, formatKey: keyof AdapterFormats): string;
241
236
  /**
242
237
  * Format a date using a format of the date library.
243
- * @template TDate
244
- * @param {TDate} value The date to format.
238
+ * @param {PickerValidDate} value The date to format.
245
239
  * @param {string} formatString The format to use.
246
240
  * @returns {string} The stringify date.
247
241
  */
248
- formatByString(value: TDate, formatString: string): string;
242
+ formatByString(value: PickerValidDate, formatString: string): string;
249
243
  /**
250
244
  * Format a number to be rendered in the clock.
251
245
  * Is being used in hijri and jalali adapters.
@@ -255,352 +249,307 @@ export interface MuiPickersAdapter<TDate extends PickerValidDate, TLocale = any>
255
249
  formatNumber(numberToFormat: string): string;
256
250
  /**
257
251
  * Check if the two dates are equal (e.g: they represent the same timestamp).
258
- * @param {TDate | null} value The reference date.
259
- * @param {TDate | null} comparing The date to compare with the reference date.
252
+ * @param {PickerValidDate | null} value The reference date.
253
+ * @param {PickerValidDate | null} comparing The date to compare with the reference date.
260
254
  * @returns {boolean} `true` if the two dates are equal.
261
255
  */
262
- isEqual(value: TDate | null, comparing: TDate | null): boolean;
256
+ isEqual(value: PickerValidDate | null, comparing: PickerValidDate | null): boolean;
263
257
  /**
264
258
  * Check if the two dates are in the same year (using the timezone of the reference date).
265
- * @template TDate
266
- * @param {TDate} value The reference date.
267
- * @param {TDate} comparing The date to compare with the reference date.
259
+ * @param {PickerValidDate} value The reference date.
260
+ * @param {PickerValidDate} comparing The date to compare with the reference date.
268
261
  * @returns {boolean} `true` if the two dates are in the same year.
269
262
  */
270
- isSameYear(value: TDate, comparing: TDate): boolean;
263
+ isSameYear(value: PickerValidDate, comparing: PickerValidDate): boolean;
271
264
  /**
272
265
  * Check if the two dates are in the same month (using the timezone of the reference date).
273
- * @template TDate
274
- * @param {TDate} value The reference date.
275
- * @param {TDate} comparing The date to compare with the reference date.
266
+ * @param {PickerValidDate} value The reference date.
267
+ * @param {PickerValidDate} comparing The date to compare with the reference date.
276
268
  * @returns {boolean} `true` if the two dates are in the same month.
277
269
  */
278
- isSameMonth(value: TDate, comparing: TDate): boolean;
270
+ isSameMonth(value: PickerValidDate, comparing: PickerValidDate): boolean;
279
271
  /**
280
272
  * Check if the two dates are in the same day (using the timezone of the reference date).
281
- * @template TDate
282
- * @param {TDate} value The reference date.
283
- * @param {TDate} comparing The date to compare with the reference date.
273
+ * @param {PickerValidDate} value The reference date.
274
+ * @param {PickerValidDate} comparing The date to compare with the reference date.
284
275
  * @returns {boolean} `true` if the two dates are in the same day.
285
276
  */
286
- isSameDay(value: TDate, comparing: TDate): boolean;
277
+ isSameDay(value: PickerValidDate, comparing: PickerValidDate): boolean;
287
278
  /**
288
279
  * Check if the two dates are at the same hour (using the timezone of the reference date).
289
- * @template TDate
290
- * @param {TDate} value The reference date.
291
- * @param {TDate} comparing The date to compare with the reference date.
280
+ * @param {PickerValidDate} value The reference date.
281
+ * @param {PickerValidDate} comparing The date to compare with the reference date.
292
282
  * @returns {boolean} `true` if the two dates are in the same hour.
293
283
  */
294
- isSameHour(value: TDate, comparing: TDate): boolean;
284
+ isSameHour(value: PickerValidDate, comparing: PickerValidDate): boolean;
295
285
  /**
296
286
  * Check if the reference date is after the second date.
297
- * @template TDate
298
- * @param {TDate} value The reference date.
299
- * @param {TDate} comparing The date to compare with the reference date.
287
+ * @param {PickerValidDate} value The reference date.
288
+ * @param {PickerValidDate} comparing The date to compare with the reference date.
300
289
  * @returns {boolean} `true` if the reference date is after the second date.
301
290
  */
302
- isAfter(value: TDate, comparing: TDate): boolean;
291
+ isAfter(value: PickerValidDate, comparing: PickerValidDate): boolean;
303
292
  /**
304
293
  * Check if the year of the reference date is after the year of the second date (using the timezone of the reference date).
305
- * @template TDate
306
- * @param {TDate} value The reference date.
307
- * @param {TDate} comparing The date to compare with the reference date.
294
+ * @param {PickerValidDate} value The reference date.
295
+ * @param {PickerValidDate} comparing The date to compare with the reference date.
308
296
  * @returns {boolean} `true` if the year of the reference date is after the year of the second date.
309
297
  */
310
- isAfterYear(value: TDate, comparing: TDate): boolean;
298
+ isAfterYear(value: PickerValidDate, comparing: PickerValidDate): boolean;
311
299
  /**
312
300
  * Check if the day of the reference date is after the day of the second date (using the timezone of the reference date).
313
- * @template TDate
314
- * @param {TDate} value The reference date.
315
- * @param {TDate} comparing The date to compare with the reference date.
301
+ * @param {PickerValidDate} value The reference date.
302
+ * @param {PickerValidDate} comparing The date to compare with the reference date.
316
303
  * @returns {boolean} `true` if the day of the reference date is after the day of the second date.
317
304
  */
318
- isAfterDay(value: TDate, comparing: TDate): boolean;
305
+ isAfterDay(value: PickerValidDate, comparing: PickerValidDate): boolean;
319
306
  /**
320
307
  * Check if the reference date is before the second date.
321
- * @template TDate
322
- * @param {TDate} value The reference date.
323
- * @param {TDate} comparing The date to compare with the reference date.
308
+ * @param {PickerValidDate} value The reference date.
309
+ * @param {PickerValidDate} comparing The date to compare with the reference date.
324
310
  * @returns {boolean} `true` if the reference date is before the second date.
325
311
  */
326
- isBefore(value: TDate, comparing: TDate): boolean;
312
+ isBefore(value: PickerValidDate, comparing: PickerValidDate): boolean;
327
313
  /**
328
314
  * Check if the year of the reference date is before the year of the second date (using the timezone of the reference date).
329
- * @template TDate
330
- * @param {TDate} value The reference date.
331
- * @param {TDate} comparing The date to compare with the reference date.
315
+ * @param {PickerValidDate} value The reference date.
316
+ * @param {PickerValidDate} comparing The date to compare with the reference date.
332
317
  * @returns {boolean} `true` if the year of the reference date is before the year of the second date.
333
318
  */
334
- isBeforeYear(value: TDate, comparing: TDate): boolean;
319
+ isBeforeYear(value: PickerValidDate, comparing: PickerValidDate): boolean;
335
320
  /**
336
321
  * Check if the day of the reference date is before the day of the second date (using the timezone of the reference date).
337
- * @template TDate
338
- * @param {TDate} value The reference date.
339
- * @param {TDate} comparing The date to compare with the reference date.
322
+ * @param {PickerValidDate} value The reference date.
323
+ * @param {PickerValidDate} comparing The date to compare with the reference date.
340
324
  * @returns {boolean} `true` if the day of the reference date is before the day of the second date.
341
325
  */
342
- isBeforeDay(value: TDate, comparing: TDate): boolean;
326
+ isBeforeDay(value: PickerValidDate, comparing: PickerValidDate): boolean;
343
327
  /**
344
328
  * Check if the value is within the provided range.
345
- * @template TDate
346
- * @param {TDate} value The value to test.
347
- * @param {[TDate, TDate]} range The range in which the value should be.
329
+ * @param {PickerValidDate} value The value to test.
330
+ * @param {[PickerValidDate, PickerValidDate]} range The range in which the value should be.
348
331
  * @returns {boolean} `true` if the value is within the provided range.
349
332
  */
350
- isWithinRange(value: TDate, range: [TDate, TDate]): boolean;
333
+ isWithinRange(value: PickerValidDate, range: [PickerValidDate, PickerValidDate]): boolean;
351
334
  /**
352
335
  * Return the start of the year for the given date.
353
- * @template TDate
354
- * @param {TDate} value The original date.
355
- * @returns {TDate} The start of the year of the given date.
336
+ * @param {PickerValidDate} value The original date.
337
+ * @returns {PickerValidDate} The start of the year of the given date.
356
338
  */
357
- startOfYear(value: TDate): TDate;
339
+ startOfYear(value: PickerValidDate): PickerValidDate;
358
340
  /**
359
341
  * Return the start of the month for the given date.
360
- * @template TDate
361
- * @param {TDate} value The original date.
362
- * @returns {TDate} The start of the month of the given date.
342
+ * @param {PickerValidDate} value The original date.
343
+ * @returns {PickerValidDate} The start of the month of the given date.
363
344
  */
364
- startOfMonth(value: TDate): TDate;
345
+ startOfMonth(value: PickerValidDate): PickerValidDate;
365
346
  /**
366
347
  * Return the start of the week for the given date.
367
- * @template TDate
368
- * @param {TDate} value The original date.
369
- * @returns {TDate} The start of the week of the given date.
348
+ * @param {PickerValidDate} value The original date.
349
+ * @returns {PickerValidDate} The start of the week of the given date.
370
350
  */
371
- startOfWeek(value: TDate): TDate;
351
+ startOfWeek(value: PickerValidDate): PickerValidDate;
372
352
  /**
373
353
  * Return the start of the day for the given date.
374
- * @template TDate
375
- * @param {TDate} value The original date.
376
- * @returns {TDate} The start of the day of the given date.
354
+ * @param {PickerValidDate} value The original date.
355
+ * @returns {PickerValidDate} The start of the day of the given date.
377
356
  */
378
- startOfDay(value: TDate): TDate;
357
+ startOfDay(value: PickerValidDate): PickerValidDate;
379
358
  /**
380
359
  * Return the end of the year for the given date.
381
- * @template TDate
382
- * @param {TDate} value The original date.
383
- * @returns {TDate} The end of the year of the given date.
360
+ * @param {PickerValidDate} value The original date.
361
+ * @returns {PickerValidDate} The end of the year of the given date.
384
362
  */
385
- endOfYear(value: TDate): TDate;
363
+ endOfYear(value: PickerValidDate): PickerValidDate;
386
364
  /**
387
365
  * Return the end of the month for the given date.
388
- * @template TDate
389
- * @param {TDate} value The original date.
390
- * @returns {TDate} The end of the month of the given date.
366
+ * @param {PickerValidDate} value The original date.
367
+ * @returns {PickerValidDate} The end of the month of the given date.
391
368
  */
392
- endOfMonth(value: TDate): TDate;
369
+ endOfMonth(value: PickerValidDate): PickerValidDate;
393
370
  /**
394
371
  * Return the end of the week for the given date.
395
- * @template TDate
396
- * @param {TDate} value The original date.
397
- * @returns {TDate} The end of the week of the given date.
372
+ * @param {PickerValidDate} value The original date.
373
+ * @returns {PickerValidDate} The end of the week of the given date.
398
374
  */
399
- endOfWeek(value: TDate): TDate;
375
+ endOfWeek(value: PickerValidDate): PickerValidDate;
400
376
  /**
401
377
  * Return the end of the day for the given date.
402
- * @template TDate
403
- * @param {TDate} value The original date.
404
- * @returns {TDate} The end of the day of the given date.
378
+ * @param {PickerValidDate} value The original date.
379
+ * @returns {PickerValidDate} The end of the day of the given date.
405
380
  */
406
- endOfDay(value: TDate): TDate;
381
+ endOfDay(value: PickerValidDate): PickerValidDate;
407
382
  /**
408
383
  * Add the specified number of years to the given date.
409
- * @template TDate
410
- * @param {TDate} value The date to be changed.
384
+ * @param {PickerValidDate} value The date to be changed.
411
385
  * @param {number} amount The amount of years to be added.
412
- * @returns {TDate} The new date with the years added.
386
+ * @returns {PickerValidDate} The new date with the years added.
413
387
  */
414
- addYears(value: TDate, amount: number): TDate;
388
+ addYears(value: PickerValidDate, amount: number): PickerValidDate;
415
389
  /**
416
390
  * Add the specified number of months to the given date.
417
- * @template TDate
418
- * @param {TDate} value The date to be changed.
391
+ * @param {PickerValidDate} value The date to be changed.
419
392
  * @param {number} amount The amount of months to be added.
420
- * @returns {TDate} The new date with the months added.
393
+ * @returns {PickerValidDate} The new date with the months added.
421
394
  */
422
- addMonths(value: TDate, amount: number): TDate;
395
+ addMonths(value: PickerValidDate, amount: number): PickerValidDate;
423
396
  /**
424
397
  * Add the specified number of weeks to the given date.
425
- * @template TDate
426
- * @param {TDate} value The date to be changed.
398
+ * @param {PickerValidDate} value The date to be changed.
427
399
  * @param {number} amount The amount of weeks to be added.
428
- * @returns {TDate} The new date with the weeks added.
400
+ * @returns {PickerValidDate} The new date with the weeks added.
429
401
  */
430
- addWeeks(value: TDate, amount: number): TDate;
402
+ addWeeks(value: PickerValidDate, amount: number): PickerValidDate;
431
403
  /**
432
404
  * Add the specified number of days to the given date.
433
- * @template TDate
434
- * @param {TDate} value The date to be changed.
405
+ * @param {PickerValidDate} value The date to be changed.
435
406
  * @param {number} amount The amount of days to be added.
436
- * @returns {TDate} The new date with the days added.
407
+ * @returns {PickerValidDate} The new date with the days added.
437
408
  */
438
- addDays(value: TDate, amount: number): TDate;
409
+ addDays(value: PickerValidDate, amount: number): PickerValidDate;
439
410
  /**
440
411
  * Add the specified number of hours to the given date.
441
- * @template TDate
442
- * @param {TDate} value The date to be changed.
412
+ * @param {PickerValidDate} value The date to be changed.
443
413
  * @param {number} amount The amount of hours to be added.
444
- * @returns {TDate} The new date with the hours added.
414
+ * @returns {PickerValidDate} The new date with the hours added.
445
415
  */
446
- addHours(value: TDate, amount: number): TDate;
416
+ addHours(value: PickerValidDate, amount: number): PickerValidDate;
447
417
  /**
448
418
  * Add the specified number of minutes to the given date.
449
- * @template TDate
450
- * @param {TDate} value The date to be changed.
419
+ * @param {PickerValidDate} value The date to be changed.
451
420
  * @param {number} amount The amount of minutes to be added.
452
- * @returns {TDate} The new date with the minutes added.
421
+ * @returns {PickerValidDate} The new date with the minutes added.
453
422
  */
454
- addMinutes(value: TDate, amount: number): TDate;
423
+ addMinutes(value: PickerValidDate, amount: number): PickerValidDate;
455
424
  /**
456
425
  * Add the specified number of seconds to the given date.
457
- * @template TDate
458
- * @param {TDate} value The date to be changed.
426
+ * @param {PickerValidDate} value The date to be changed.
459
427
  * @param {number} amount The amount of seconds to be added.
460
- * @returns {TDate} The new date with the seconds added.
428
+ * @returns {PickerValidDate} The new date with the seconds added.
461
429
  */
462
- addSeconds(value: TDate, amount: number): TDate;
430
+ addSeconds(value: PickerValidDate, amount: number): PickerValidDate;
463
431
  /**
464
432
  * Get the year of the given date.
465
- * @template TDate
466
- * @param {TDate} value The given date.
433
+ * @param {PickerValidDate} value The given date.
467
434
  * @returns {number} The year of the given date.
468
435
  */
469
- getYear(value: TDate): number;
436
+ getYear(value: PickerValidDate): number;
470
437
  /**
471
438
  * Get the month of the given date.
472
439
  * The value is 0-based, in the Gregorian calendar January = 0, February = 1, ...
473
- * @template TDate
474
- * @param {TDate} value The given date.
440
+ * @param {PickerValidDate} value The given date.
475
441
  * @returns {number} The month of the given date.
476
442
  */
477
- getMonth(value: TDate): number;
443
+ getMonth(value: PickerValidDate): number;
478
444
  /**
479
445
  * Get the date (e.g: the day in the month) of the given date.
480
- * @template TDate
481
- * @param {TDate} value The given date.
446
+ * @param {PickerValidDate} value The given date.
482
447
  * @returns {number} The date of the given date.
483
448
  */
484
- getDate(value: TDate): number;
449
+ getDate(value: PickerValidDate): number;
485
450
  /**
486
451
  * Get the hours of the given date.
487
- * @template TDate
488
- * @param {TDate} value The given date.
452
+ * @param {PickerValidDate} value The given date.
489
453
  * @returns {number} The hours of the given date.
490
454
  */
491
- getHours(value: TDate): number;
455
+ getHours(value: PickerValidDate): number;
492
456
  /**
493
457
  * Get the minutes of the given date.
494
- * @template TDate
495
- * @param {TDate} value The given date.
458
+ * @param {PickerValidDate} value The given date.
496
459
  * @returns {number} The minutes of the given date.
497
460
  */
498
- getMinutes(value: TDate): number;
461
+ getMinutes(value: PickerValidDate): number;
499
462
  /**
500
463
  * Get the seconds of the given date.
501
- * @template TDate
502
- * @param {TDate} value The given date.
464
+ * @param {PickerValidDate} value The given date.
503
465
  * @returns {number} The seconds of the given date.
504
466
  */
505
- getSeconds(value: TDate): number;
467
+ getSeconds(value: PickerValidDate): number;
506
468
  /**
507
469
  * Get the milliseconds of the given date.
508
- * @template TDate
509
- * @param {TDate} value The given date.
470
+ * @param {PickerValidDate} value The given date.
510
471
  * @returns {number} The milliseconds of the given date.
511
472
  */
512
- getMilliseconds(value: TDate): number;
473
+ getMilliseconds(value: PickerValidDate): number;
513
474
  /**
514
475
  * Set the year to the given date.
515
- * @template TDate
516
- * @param {TDate} value The date to be changed.
476
+ * @param {PickerValidDate} value The date to be changed.
517
477
  * @param {number} year The year of the new date.
518
- * @returns {TDate} The new date with the year set.
478
+ * @returns {PickerValidDate} The new date with the year set.
519
479
  */
520
- setYear(value: TDate, year: number): TDate;
480
+ setYear(value: PickerValidDate, year: number): PickerValidDate;
521
481
  /**
522
482
  * Set the month to the given date.
523
- * @template TDate
524
- * @param {TDate} value The date to be changed.
483
+ * @param {PickerValidDate} value The date to be changed.
525
484
  * @param {number} month The month of the new date.
526
- * @returns {TDate} The new date with the month set.
485
+ * @returns {PickerValidDate} The new date with the month set.
527
486
  */
528
- setMonth(value: TDate, month: number): TDate;
487
+ setMonth(value: PickerValidDate, month: number): PickerValidDate;
529
488
  /**
530
489
  * Set the date (e.g: the day in the month) to the given date.
531
- * @template TDate
532
- * @param {TDate} value The date to be changed.
490
+ * @param {PickerValidDate} value The date to be changed.
533
491
  * @param {number} date The date of the new date.
534
- * @returns {TDate} The new date with the date set.
492
+ * @returns {PickerValidDate} The new date with the date set.
535
493
  */
536
- setDate(value: TDate, date: number): TDate;
494
+ setDate(value: PickerValidDate, date: number): PickerValidDate;
537
495
  /**
538
496
  * Set the hours to the given date.
539
- * @template TDate
540
- * @param {TDate} value The date to be changed.
497
+ * @param {PickerValidDate} value The date to be changed.
541
498
  * @param {number} hours The hours of the new date.
542
- * @returns {TDate} The new date with the hours set.
499
+ * @returns {PickerValidDate} The new date with the hours set.
543
500
  */
544
- setHours(value: TDate, hours: number): TDate;
501
+ setHours(value: PickerValidDate, hours: number): PickerValidDate;
545
502
  /**
546
503
  * Set the minutes to the given date.
547
- * @template TDate
548
- * @param {TDate} value The date to be changed.
504
+ * @param {PickerValidDate} value The date to be changed.
549
505
  * @param {number} minutes The minutes of the new date.
550
- * @returns {TDate} The new date with the minutes set.
506
+ * @returns {PickerValidDate} The new date with the minutes set.
551
507
  */
552
- setMinutes(value: TDate, minutes: number): TDate;
508
+ setMinutes(value: PickerValidDate, minutes: number): PickerValidDate;
553
509
  /**
554
510
  * Set the seconds to the given date.
555
- * @template TDate
556
- * @param {TDate} value The date to be changed.
511
+ * @param {PickerValidDate} value The date to be changed.
557
512
  * @param {number} seconds The seconds of the new date.
558
- * @returns {TDate} The new date with the seconds set.
513
+ * @returns {PickerValidDate} The new date with the seconds set.
559
514
  */
560
- setSeconds(value: TDate, seconds: number): TDate;
515
+ setSeconds(value: PickerValidDate, seconds: number): PickerValidDate;
561
516
  /**
562
517
  * Set the milliseconds to the given date.
563
- * @template TDate
564
- * @param {TDate} value The date to be changed.
518
+ * @param {PickerValidDate} value The date to be changed.
565
519
  * @param {number} milliseconds The milliseconds of the new date.
566
- * @returns {TDate} The new date with the milliseconds set.
520
+ * @returns {PickerValidDate} The new date with the milliseconds set.
567
521
  */
568
- setMilliseconds(value: TDate, milliseconds: number): TDate;
522
+ setMilliseconds(value: PickerValidDate, milliseconds: number): PickerValidDate;
569
523
  /**
570
524
  * Get the number of days in a month of the given date.
571
- * @template TDate
572
- * @param {TDate} value The given date.
525
+ * @param {PickerValidDate} value The given date.
573
526
  * @returns {number} The number of days in the month
574
527
  */
575
- getDaysInMonth(value: TDate): number;
528
+ getDaysInMonth(value: PickerValidDate): number;
576
529
  /**
577
530
  * Create a nested list with all the days of the month of the given date grouped by week.
578
- * @template TDate
579
- * @param {TDate} value The given date.
580
- * @returns {TDate[][]} A nested list with all the days of the month grouped by week.
531
+ * @param {PickerValidDate} value The given date.
532
+ * @returns {PickerValidDate[][]} A nested list with all the days of the month grouped by week.
581
533
  */
582
- getWeekArray(value: TDate): TDate[][];
534
+ getWeekArray(value: PickerValidDate): PickerValidDate[][];
583
535
  /**
584
536
  * Get the number of the week of the given date.
585
- * @template TDate
586
- * @param {TDate} value The given date.
537
+ * @param {PickerValidDate} value The given date.
587
538
  * @returns {number} The number of the week of the given date.
588
539
  */
589
- getWeekNumber(value: TDate): number;
540
+ getWeekNumber(value: PickerValidDate): number;
590
541
  /**
591
542
  * Get the number of the day of the week of the given date.
592
543
  * The value is 1-based, 1 - first day of the week, 7 - last day of the week.
593
- * @template TDate
594
- * @param {TDate} value The given date.
544
+ * @param {PickerValidDate} value The given date.
595
545
  * @returns {number} The number of the day of the week of the given date.
596
546
  */
597
- getDayOfWeek(value: TDate): number;
547
+ getDayOfWeek(value: PickerValidDate): number;
598
548
  /**
599
549
  * Create a list with all the years between the start and the end date.
600
- * @template TDate
601
- * @param {[TDate, TDate]} range The range of year to create.
602
- * @returns {TDate[]} List of all the years between the start end the end date.
550
+ * @param {[PickerValidDate, PickerValidDate]} range The range of year to create.
551
+ * @returns {PickerValidDate[]} List of all the years between the start end the end date.
603
552
  */
604
- getYearRange(range: [TDate, TDate]): TDate[];
553
+ getYearRange(range: [PickerValidDate, PickerValidDate]): PickerValidDate[];
605
554
  }
606
555
  export {};