@mui/x-date-pickers-pro 7.0.0-beta.2 → 7.0.0-beta.5

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 (278) hide show
  1. package/CHANGELOG.md +429 -30
  2. package/DateRangeCalendar/DateRangeCalendar.js +3 -1
  3. package/DateRangeCalendar/DateRangeCalendar.types.d.ts +3 -0
  4. package/DateRangePicker/DateRangePicker.d.ts +1 -1
  5. package/DateRangePicker/DateRangePicker.js +9 -9
  6. package/DateRangePicker/DateRangePicker.types.d.ts +3 -3
  7. package/DateRangePicker/DateRangePickerToolbar.d.ts +5 -2
  8. package/DateRangePicker/DateRangePickerToolbar.js +22 -2
  9. package/DateTimeRangePicker/DateTimeRangePicker.d.ts +1 -1
  10. package/DateTimeRangePicker/DateTimeRangePicker.js +11 -12
  11. package/DateTimeRangePicker/DateTimeRangePicker.types.d.ts +3 -3
  12. package/DateTimeRangePicker/DateTimeRangePickerTabs.js +7 -1
  13. package/DateTimeRangePicker/DateTimeRangePickerToolbar.d.ts +3 -0
  14. package/DateTimeRangePicker/DateTimeRangePickerToolbar.js +45 -9
  15. package/DateTimeRangePicker/shared.js +8 -3
  16. package/DesktopDateRangePicker/DesktopDateRangePicker.d.ts +1 -1
  17. package/DesktopDateRangePicker/DesktopDateRangePicker.js +9 -9
  18. package/DesktopDateRangePicker/DesktopDateRangePicker.types.d.ts +3 -3
  19. package/DesktopDateTimeRangePicker/DesktopDateTimeRangePicker.d.ts +1 -1
  20. package/DesktopDateTimeRangePicker/DesktopDateTimeRangePicker.js +11 -12
  21. package/DesktopDateTimeRangePicker/DesktopDateTimeRangePicker.types.d.ts +3 -3
  22. package/MobileDateRangePicker/MobileDateRangePicker.d.ts +1 -1
  23. package/MobileDateRangePicker/MobileDateRangePicker.js +9 -9
  24. package/MobileDateRangePicker/MobileDateRangePicker.types.d.ts +3 -3
  25. package/MobileDateTimeRangePicker/MobileDateTimeRangePicker.d.ts +1 -1
  26. package/MobileDateTimeRangePicker/MobileDateTimeRangePicker.js +11 -12
  27. package/MobileDateTimeRangePicker/MobileDateTimeRangePicker.types.d.ts +3 -3
  28. package/MultiInputDateRangeField/MultiInputDateRangeField.d.ts +1 -1
  29. package/MultiInputDateRangeField/MultiInputDateRangeField.js +17 -19
  30. package/MultiInputDateRangeField/MultiInputDateRangeField.types.d.ts +11 -14
  31. package/MultiInputDateTimeRangeField/MultiInputDateTimeRangeField.d.ts +1 -1
  32. package/MultiInputDateTimeRangeField/MultiInputDateTimeRangeField.js +17 -19
  33. package/MultiInputDateTimeRangeField/MultiInputDateTimeRangeField.types.d.ts +12 -16
  34. package/MultiInputTimeRangeField/MultiInputTimeRangeField.d.ts +1 -1
  35. package/MultiInputTimeRangeField/MultiInputTimeRangeField.js +17 -19
  36. package/MultiInputTimeRangeField/MultiInputTimeRangeField.types.d.ts +12 -16
  37. package/SingleInputDateRangeField/SingleInputDateRangeField.d.ts +2 -2
  38. package/SingleInputDateRangeField/SingleInputDateRangeField.js +12 -10
  39. package/SingleInputDateRangeField/SingleInputDateRangeField.types.d.ts +11 -14
  40. package/SingleInputDateRangeField/index.d.ts +1 -1
  41. package/SingleInputDateRangeField/useSingleInputDateRangeField.d.ts +2 -3
  42. package/SingleInputDateRangeField/useSingleInputDateRangeField.js +2 -15
  43. package/SingleInputDateTimeRangeField/SingleInputDateTimeRangeField.d.ts +2 -2
  44. package/SingleInputDateTimeRangeField/SingleInputDateTimeRangeField.js +12 -10
  45. package/SingleInputDateTimeRangeField/SingleInputDateTimeRangeField.types.d.ts +12 -15
  46. package/SingleInputDateTimeRangeField/index.d.ts +1 -1
  47. package/SingleInputDateTimeRangeField/useSingleInputDateTimeRangeField.d.ts +2 -3
  48. package/SingleInputDateTimeRangeField/useSingleInputDateTimeRangeField.js +2 -20
  49. package/SingleInputTimeRangeField/SingleInputTimeRangeField.d.ts +2 -2
  50. package/SingleInputTimeRangeField/SingleInputTimeRangeField.js +11 -9
  51. package/SingleInputTimeRangeField/SingleInputTimeRangeField.types.d.ts +12 -15
  52. package/SingleInputTimeRangeField/index.d.ts +1 -1
  53. package/SingleInputTimeRangeField/useSingleInputTimeRangeField.d.ts +2 -3
  54. package/SingleInputTimeRangeField/useSingleInputTimeRangeField.js +2 -14
  55. package/StaticDateRangePicker/StaticDateRangePicker.js +0 -1
  56. package/StaticDateRangePicker/StaticDateRangePicker.types.d.ts +1 -1
  57. package/index.d.ts +0 -1
  58. package/index.js +2 -1
  59. package/internals/hooks/models/useRangePicker.d.ts +5 -5
  60. package/internals/hooks/useDesktopRangePicker/useDesktopRangePicker.d.ts +1 -1
  61. package/internals/hooks/useDesktopRangePicker/useDesktopRangePicker.js +16 -7
  62. package/internals/hooks/useDesktopRangePicker/useDesktopRangePicker.types.d.ts +5 -5
  63. package/internals/hooks/useEnrichedRangePickerFieldProps.d.ts +15 -15
  64. package/internals/hooks/useEnrichedRangePickerFieldProps.js +37 -40
  65. package/internals/hooks/useMobileRangePicker/useMobileRangePicker.d.ts +1 -1
  66. package/internals/hooks/useMobileRangePicker/useMobileRangePicker.js +18 -9
  67. package/internals/hooks/useMobileRangePicker/useMobileRangePicker.types.d.ts +5 -5
  68. package/internals/hooks/useMultiInputFieldSelectedSections.d.ts +21 -0
  69. package/internals/hooks/useMultiInputFieldSelectedSections.js +43 -0
  70. package/internals/hooks/useMultiInputRangeField/useMultiInputDateRangeField.d.ts +1 -1
  71. package/internals/hooks/useMultiInputRangeField/useMultiInputDateRangeField.js +17 -12
  72. package/internals/hooks/useMultiInputRangeField/useMultiInputDateTimeRangeField.d.ts +2 -3
  73. package/internals/hooks/useMultiInputRangeField/useMultiInputDateTimeRangeField.js +23 -31
  74. package/internals/hooks/useMultiInputRangeField/useMultiInputRangeField.types.d.ts +4 -4
  75. package/internals/hooks/useMultiInputRangeField/useMultiInputTimeRangeField.d.ts +2 -3
  76. package/internals/hooks/useMultiInputRangeField/useMultiInputTimeRangeField.js +23 -25
  77. package/internals/hooks/useRangePosition.d.ts +2 -4
  78. package/internals/hooks/useRangePosition.js +3 -6
  79. package/internals/hooks/useStaticRangePicker/useStaticRangePicker.js +1 -0
  80. package/internals/hooks/useStaticRangePicker/useStaticRangePicker.types.d.ts +1 -2
  81. package/internals/models/dateRange.d.ts +3 -15
  82. package/internals/models/dateTimeRange.d.ts +4 -6
  83. package/internals/models/index.d.ts +0 -1
  84. package/internals/models/index.js +0 -1
  85. package/internals/models/timeRange.d.ts +3 -6
  86. package/internals/utils/date-fields-utils.d.ts +1 -5
  87. package/internals/utils/releaseInfo.js +1 -1
  88. package/internals/utils/valueManagers.d.ts +1 -2
  89. package/internals/utils/valueManagers.js +11 -6
  90. package/models/fields.d.ts +69 -0
  91. package/models/index.d.ts +1 -0
  92. package/models/index.js +1 -0
  93. package/modern/DateRangeCalendar/DateRangeCalendar.js +3 -1
  94. package/modern/DateRangePicker/DateRangePicker.js +9 -9
  95. package/modern/DateRangePicker/DateRangePickerToolbar.js +22 -2
  96. package/modern/DateTimeRangePicker/DateTimeRangePicker.js +11 -12
  97. package/modern/DateTimeRangePicker/DateTimeRangePickerTabs.js +7 -1
  98. package/modern/DateTimeRangePicker/DateTimeRangePickerToolbar.js +45 -9
  99. package/modern/DateTimeRangePicker/shared.js +7 -2
  100. package/modern/DesktopDateRangePicker/DesktopDateRangePicker.js +9 -9
  101. package/modern/DesktopDateTimeRangePicker/DesktopDateTimeRangePicker.js +11 -12
  102. package/modern/MobileDateRangePicker/MobileDateRangePicker.js +9 -9
  103. package/modern/MobileDateTimeRangePicker/MobileDateTimeRangePicker.js +11 -12
  104. package/modern/MultiInputDateRangeField/MultiInputDateRangeField.js +17 -19
  105. package/modern/MultiInputDateTimeRangeField/MultiInputDateTimeRangeField.js +17 -19
  106. package/modern/MultiInputTimeRangeField/MultiInputTimeRangeField.js +17 -19
  107. package/modern/SingleInputDateRangeField/SingleInputDateRangeField.js +12 -10
  108. package/modern/SingleInputDateRangeField/useSingleInputDateRangeField.js +2 -14
  109. package/modern/SingleInputDateTimeRangeField/SingleInputDateTimeRangeField.js +12 -10
  110. package/modern/SingleInputDateTimeRangeField/useSingleInputDateTimeRangeField.js +2 -19
  111. package/modern/SingleInputTimeRangeField/SingleInputTimeRangeField.js +11 -9
  112. package/modern/SingleInputTimeRangeField/useSingleInputTimeRangeField.js +2 -13
  113. package/modern/StaticDateRangePicker/StaticDateRangePicker.js +0 -1
  114. package/modern/index.js +2 -1
  115. package/modern/internals/hooks/useDesktopRangePicker/useDesktopRangePicker.js +16 -7
  116. package/modern/internals/hooks/useEnrichedRangePickerFieldProps.js +34 -37
  117. package/modern/internals/hooks/useMobileRangePicker/useMobileRangePicker.js +18 -9
  118. package/modern/internals/hooks/useMultiInputFieldSelectedSections.js +40 -0
  119. package/modern/internals/hooks/useMultiInputRangeField/useMultiInputDateRangeField.js +17 -12
  120. package/modern/internals/hooks/useMultiInputRangeField/useMultiInputDateTimeRangeField.js +23 -30
  121. package/modern/internals/hooks/useMultiInputRangeField/useMultiInputTimeRangeField.js +23 -24
  122. package/modern/internals/hooks/useRangePosition.js +3 -6
  123. package/modern/internals/hooks/useStaticRangePicker/useStaticRangePicker.js +1 -0
  124. package/modern/internals/models/index.js +0 -1
  125. package/modern/internals/utils/releaseInfo.js +1 -1
  126. package/modern/internals/utils/valueManagers.js +11 -6
  127. package/modern/models/index.js +1 -0
  128. package/node/DateRangeCalendar/DateRangeCalendar.js +3 -1
  129. package/node/DateRangePicker/DateRangePicker.js +9 -9
  130. package/node/DateRangePicker/DateRangePickerToolbar.js +22 -2
  131. package/node/DateTimeRangePicker/DateTimeRangePicker.js +11 -12
  132. package/node/DateTimeRangePicker/DateTimeRangePickerTabs.js +7 -1
  133. package/node/DateTimeRangePicker/DateTimeRangePickerToolbar.js +45 -9
  134. package/node/DateTimeRangePicker/shared.js +7 -2
  135. package/node/DesktopDateRangePicker/DesktopDateRangePicker.js +9 -9
  136. package/node/DesktopDateTimeRangePicker/DesktopDateTimeRangePicker.js +11 -12
  137. package/node/MobileDateRangePicker/MobileDateRangePicker.js +9 -9
  138. package/node/MobileDateTimeRangePicker/MobileDateTimeRangePicker.js +13 -14
  139. package/node/MultiInputDateRangeField/MultiInputDateRangeField.js +17 -19
  140. package/node/MultiInputDateTimeRangeField/MultiInputDateTimeRangeField.js +17 -19
  141. package/node/MultiInputTimeRangeField/MultiInputTimeRangeField.js +17 -19
  142. package/node/SingleInputDateRangeField/SingleInputDateRangeField.js +12 -10
  143. package/node/SingleInputDateRangeField/useSingleInputDateRangeField.js +2 -16
  144. package/node/SingleInputDateTimeRangeField/SingleInputDateTimeRangeField.js +15 -13
  145. package/node/SingleInputDateTimeRangeField/useSingleInputDateTimeRangeField.js +2 -21
  146. package/node/SingleInputTimeRangeField/SingleInputTimeRangeField.js +11 -9
  147. package/node/SingleInputTimeRangeField/useSingleInputTimeRangeField.js +2 -15
  148. package/node/StaticDateRangePicker/StaticDateRangePicker.js +0 -1
  149. package/node/index.js +1 -1
  150. package/node/internals/hooks/useDesktopRangePicker/useDesktopRangePicker.js +16 -7
  151. package/node/internals/hooks/useEnrichedRangePickerFieldProps.js +33 -36
  152. package/node/internals/hooks/useMobileRangePicker/useMobileRangePicker.js +18 -9
  153. package/node/internals/hooks/useMultiInputFieldSelectedSections.js +50 -0
  154. package/node/internals/hooks/useMultiInputRangeField/useMultiInputDateRangeField.js +16 -11
  155. package/node/internals/hooks/useMultiInputRangeField/useMultiInputDateTimeRangeField.js +23 -31
  156. package/node/internals/hooks/useMultiInputRangeField/useMultiInputTimeRangeField.js +23 -25
  157. package/node/internals/hooks/useRangePosition.js +3 -8
  158. package/node/internals/hooks/useStaticRangePicker/useStaticRangePicker.js +1 -0
  159. package/node/internals/models/index.js +0 -11
  160. package/node/internals/utils/releaseInfo.js +1 -1
  161. package/node/internals/utils/valueManagers.js +10 -5
  162. package/node/models/index.js +11 -0
  163. package/package.json +5 -5
  164. package/themeAugmentation/props.d.ts +15 -14
  165. package/internals/models/fields.d.ts +0 -49
  166. package/legacy/AdapterDateFns/index.js +0 -1
  167. package/legacy/AdapterDateFnsJalali/index.js +0 -1
  168. package/legacy/AdapterDateFnsV3/index.js +0 -1
  169. package/legacy/AdapterDayjs/index.js +0 -1
  170. package/legacy/AdapterLuxon/index.js +0 -1
  171. package/legacy/AdapterMoment/index.js +0 -1
  172. package/legacy/AdapterMomentHijri/index.js +0 -1
  173. package/legacy/AdapterMomentJalaali/index.js +0 -1
  174. package/legacy/DateRangeCalendar/DateRangeCalendar.js +0 -764
  175. package/legacy/DateRangeCalendar/DateRangeCalendar.types.js +0 -1
  176. package/legacy/DateRangeCalendar/dateRangeCalendarClasses.js +0 -5
  177. package/legacy/DateRangeCalendar/index.js +0 -2
  178. package/legacy/DateRangeCalendar/useDragRange.js +0 -258
  179. package/legacy/DateRangePicker/DateRangePicker.js +0 -334
  180. package/legacy/DateRangePicker/DateRangePicker.types.js +0 -1
  181. package/legacy/DateRangePicker/DateRangePickerToolbar.js +0 -127
  182. package/legacy/DateRangePicker/dateRangePickerToolbarClasses.js +0 -5
  183. package/legacy/DateRangePicker/index.js +0 -3
  184. package/legacy/DateRangePicker/shared.js +0 -33
  185. package/legacy/DateRangePickerDay/DateRangePickerDay.js +0 -366
  186. package/legacy/DateRangePickerDay/dateRangePickerDayClasses.js +0 -5
  187. package/legacy/DateRangePickerDay/index.js +0 -2
  188. package/legacy/DateTimeRangePicker/DateTimeRangePicker.js +0 -413
  189. package/legacy/DateTimeRangePicker/DateTimeRangePicker.types.js +0 -1
  190. package/legacy/DateTimeRangePicker/DateTimeRangePickerTabs.js +0 -191
  191. package/legacy/DateTimeRangePicker/DateTimeRangePickerTimeWrapper.js +0 -57
  192. package/legacy/DateTimeRangePicker/DateTimeRangePickerToolbar.js +0 -184
  193. package/legacy/DateTimeRangePicker/dateTimeRangePickerTabsClasses.js +0 -6
  194. package/legacy/DateTimeRangePicker/dateTimeRangePickerToolbarClasses.js +0 -5
  195. package/legacy/DateTimeRangePicker/index.js +0 -5
  196. package/legacy/DateTimeRangePicker/shared.js +0 -54
  197. package/legacy/DesktopDateRangePicker/DesktopDateRangePicker.js +0 -343
  198. package/legacy/DesktopDateRangePicker/DesktopDateRangePicker.types.js +0 -1
  199. package/legacy/DesktopDateRangePicker/index.js +0 -1
  200. package/legacy/DesktopDateTimeRangePicker/DesktopDateTimeRangePicker.js +0 -491
  201. package/legacy/DesktopDateTimeRangePicker/DesktopDateTimeRangePicker.types.js +0 -1
  202. package/legacy/DesktopDateTimeRangePicker/DesktopDateTimeRangePickerLayout.js +0 -48
  203. package/legacy/DesktopDateTimeRangePicker/index.js +0 -1
  204. package/legacy/MobileDateRangePicker/MobileDateRangePicker.js +0 -339
  205. package/legacy/MobileDateRangePicker/MobileDateRangePicker.types.js +0 -1
  206. package/legacy/MobileDateRangePicker/index.js +0 -1
  207. package/legacy/MobileDateTimeRangePicker/MobileDateTimeRangePicker.js +0 -484
  208. package/legacy/MobileDateTimeRangePicker/MobileDateTimeRangePicker.types.js +0 -1
  209. package/legacy/MobileDateTimeRangePicker/index.js +0 -1
  210. package/legacy/MultiInputDateRangeField/MultiInputDateRangeField.js +0 -316
  211. package/legacy/MultiInputDateRangeField/MultiInputDateRangeField.types.js +0 -1
  212. package/legacy/MultiInputDateRangeField/index.js +0 -2
  213. package/legacy/MultiInputDateTimeRangeField/MultiInputDateTimeRangeField.js +0 -357
  214. package/legacy/MultiInputDateTimeRangeField/MultiInputDateTimeRangeField.types.js +0 -1
  215. package/legacy/MultiInputDateTimeRangeField/index.js +0 -2
  216. package/legacy/MultiInputTimeRangeField/MultiInputTimeRangeField.js +0 -330
  217. package/legacy/MultiInputTimeRangeField/MultiInputTimeRangeField.types.js +0 -1
  218. package/legacy/MultiInputTimeRangeField/index.js +0 -2
  219. package/legacy/SingleInputDateRangeField/SingleInputDateRangeField.js +0 -307
  220. package/legacy/SingleInputDateRangeField/SingleInputDateRangeField.types.js +0 -1
  221. package/legacy/SingleInputDateRangeField/index.js +0 -2
  222. package/legacy/SingleInputDateRangeField/useSingleInputDateRangeField.js +0 -30
  223. package/legacy/SingleInputDateTimeRangeField/SingleInputDateTimeRangeField.js +0 -348
  224. package/legacy/SingleInputDateTimeRangeField/SingleInputDateTimeRangeField.types.js +0 -1
  225. package/legacy/SingleInputDateTimeRangeField/index.js +0 -2
  226. package/legacy/SingleInputDateTimeRangeField/useSingleInputDateTimeRangeField.js +0 -35
  227. package/legacy/SingleInputTimeRangeField/SingleInputTimeRangeField.js +0 -321
  228. package/legacy/SingleInputTimeRangeField/SingleInputTimeRangeField.types.js +0 -1
  229. package/legacy/SingleInputTimeRangeField/index.js +0 -2
  230. package/legacy/SingleInputTimeRangeField/useSingleInputTimeRangeField.js +0 -29
  231. package/legacy/StaticDateRangePicker/StaticDateRangePicker.js +0 -276
  232. package/legacy/StaticDateRangePicker/StaticDateRangePicker.types.js +0 -1
  233. package/legacy/StaticDateRangePicker/index.js +0 -1
  234. package/legacy/dateRangeViewRenderers/dateRangeViewRenderers.js +0 -87
  235. package/legacy/dateRangeViewRenderers/index.js +0 -1
  236. package/legacy/index.js +0 -52
  237. package/legacy/internals/constants/dimensions.js +0 -5
  238. package/legacy/internals/hooks/models/index.js +0 -1
  239. package/legacy/internals/hooks/models/useRangePicker.js +0 -1
  240. package/legacy/internals/hooks/useDesktopRangePicker/index.js +0 -1
  241. package/legacy/internals/hooks/useDesktopRangePicker/useDesktopRangePicker.js +0 -154
  242. package/legacy/internals/hooks/useDesktopRangePicker/useDesktopRangePicker.types.js +0 -1
  243. package/legacy/internals/hooks/useEnrichedRangePickerFieldProps.js +0 -258
  244. package/legacy/internals/hooks/useMobileRangePicker/index.js +0 -1
  245. package/legacy/internals/hooks/useMobileRangePicker/useMobileRangePicker.js +0 -144
  246. package/legacy/internals/hooks/useMobileRangePicker/useMobileRangePicker.types.js +0 -1
  247. package/legacy/internals/hooks/useMultiInputRangeField/shared.js +0 -9
  248. package/legacy/internals/hooks/useMultiInputRangeField/useMultiInputDateRangeField.js +0 -102
  249. package/legacy/internals/hooks/useMultiInputRangeField/useMultiInputDateTimeRangeField.js +0 -115
  250. package/legacy/internals/hooks/useMultiInputRangeField/useMultiInputRangeField.types.js +0 -1
  251. package/legacy/internals/hooks/useMultiInputRangeField/useMultiInputTimeRangeField.js +0 -109
  252. package/legacy/internals/hooks/useRangePosition.js +0 -39
  253. package/legacy/internals/hooks/useStaticRangePicker/index.js +0 -1
  254. package/legacy/internals/hooks/useStaticRangePicker/useStaticRangePicker.js +0 -76
  255. package/legacy/internals/hooks/useStaticRangePicker/useStaticRangePicker.types.js +0 -1
  256. package/legacy/internals/models/dateRange.js +0 -1
  257. package/legacy/internals/models/dateTimeRange.js +0 -1
  258. package/legacy/internals/models/index.js +0 -5
  259. package/legacy/internals/models/rangePickerProps.js +0 -1
  260. package/legacy/internals/models/timeRange.js +0 -1
  261. package/legacy/internals/utils/date-fields-utils.js +0 -26
  262. package/legacy/internals/utils/date-range-manager.js +0 -65
  263. package/legacy/internals/utils/date-utils.js +0 -12
  264. package/legacy/internals/utils/releaseInfo.js +0 -13
  265. package/legacy/internals/utils/validation/validateDateRange.js +0 -45
  266. package/legacy/internals/utils/validation/validateDateTimeRange.js +0 -45
  267. package/legacy/internals/utils/validation/validateTimeRange.js +0 -32
  268. package/legacy/internals/utils/valueManagers.js +0 -135
  269. package/legacy/locales/index.js +0 -1
  270. package/legacy/models/index.js +0 -3
  271. package/legacy/models/multiInputRangeFieldClasses.js +0 -1
  272. package/legacy/models/range.js +0 -1
  273. package/legacy/models/validation.js +0 -1
  274. package/legacy/themeAugmentation/index.js +0 -4
  275. package/modern/internals/models/fields.js +0 -1
  276. /package/{internals/models → models}/fields.js +0 -0
  277. /package/{legacy/internals → modern}/models/fields.js +0 -0
  278. /package/node/{internals/models → models}/fields.js +0 -0
@@ -133,10 +133,13 @@ process.env.NODE_ENV !== "production" ? DateRangePicker.propTypes = {
133
133
  * If `true`, the week number will be display in the calendar.
134
134
  */
135
135
  displayWeekNumber: PropTypes.bool,
136
+ /**
137
+ * @default false
138
+ */
139
+ enableAccessibleFieldDOMStructure: PropTypes.any,
136
140
  /**
137
141
  * The day view will show as many weeks as needed after the end of the current month to match this value.
138
142
  * Put it to 6 to have a fixed number of weeks in Gregorian calendars
139
- * @default undefined
140
143
  */
141
144
  fixedWeekNumber: PropTypes.number,
142
145
  /**
@@ -263,17 +266,14 @@ process.env.NODE_ENV !== "production" ? DateRangePicker.propTypes = {
263
266
  renderLoading: PropTypes.func,
264
267
  /**
265
268
  * The currently selected sections.
266
- * This prop accept four formats:
269
+ * This prop accepts four formats:
267
270
  * 1. If a number is provided, the section at this index will be selected.
268
- * 2. If an object with a `startIndex` and `endIndex` properties are provided, the sections between those two indexes will be selected.
269
- * 3. If a string of type `FieldSectionType` is provided, the first section with that name will be selected.
270
- * 4. If `null` is provided, no section will be selected
271
+ * 2. If a string of type `FieldSectionType` is provided, the first section with that name will be selected.
272
+ * 3. If `"all"` is provided, all the sections will be selected.
273
+ * 4. If `null` is provided, no section will be selected.
271
274
  * If not provided, the selected sections will be handled internally.
272
275
  */
273
- selectedSections: PropTypes.oneOfType([PropTypes.oneOf(['all', 'day', 'empty', 'hours', 'meridiem', 'minutes', 'month', 'seconds', 'weekDay', 'year']), PropTypes.number, PropTypes.shape({
274
- endIndex: PropTypes.number.isRequired,
275
- startIndex: PropTypes.number.isRequired
276
- })]),
276
+ selectedSections: PropTypes.oneOfType([PropTypes.oneOf(['all', 'day', 'empty', 'hours', 'meridiem', 'minutes', 'month', 'seconds', 'weekDay', 'year']), PropTypes.number]),
277
277
  /**
278
278
  * Disable specific date.
279
279
  *
@@ -3,9 +3,9 @@ import { DesktopDateRangePickerProps, DesktopDateRangePickerSlots, DesktopDateRa
3
3
  import { MobileDateRangePickerProps, MobileDateRangePickerSlots, MobileDateRangePickerSlotProps } from '../MobileDateRangePicker';
4
4
  export interface DateRangePickerSlots<TDate extends PickerValidDate> extends DesktopDateRangePickerSlots<TDate>, MobileDateRangePickerSlots<TDate> {
5
5
  }
6
- export interface DateRangePickerSlotProps<TDate extends PickerValidDate> extends DesktopDateRangePickerSlotProps<TDate>, MobileDateRangePickerSlotProps<TDate> {
6
+ export interface DateRangePickerSlotProps<TDate extends PickerValidDate, TEnableAccessibleFieldDOMStructure extends boolean> extends DesktopDateRangePickerSlotProps<TDate, TEnableAccessibleFieldDOMStructure>, MobileDateRangePickerSlotProps<TDate, TEnableAccessibleFieldDOMStructure> {
7
7
  }
8
- export interface DateRangePickerProps<TDate extends PickerValidDate> extends DesktopDateRangePickerProps<TDate>, MobileDateRangePickerProps<TDate> {
8
+ export interface DateRangePickerProps<TDate extends PickerValidDate, TEnableAccessibleFieldDOMStructure extends boolean = false> extends DesktopDateRangePickerProps<TDate, TEnableAccessibleFieldDOMStructure>, MobileDateRangePickerProps<TDate, TEnableAccessibleFieldDOMStructure> {
9
9
  /**
10
10
  * CSS media query when `Mobile` mode will be changed to `Desktop`.
11
11
  * @default '@media (pointer: fine)'
@@ -21,5 +21,5 @@ export interface DateRangePickerProps<TDate extends PickerValidDate> extends Des
21
21
  * The props used for each component slot.
22
22
  * @default {}
23
23
  */
24
- slotProps?: DateRangePickerSlotProps<TDate>;
24
+ slotProps?: DateRangePickerSlotProps<TDate, TEnableAccessibleFieldDOMStructure>;
25
25
  }
@@ -4,10 +4,13 @@ import { PickerValidDate } from '@mui/x-date-pickers/models';
4
4
  import { DateRange } from '../models';
5
5
  import { UseRangePositionResponse } from '../internals/hooks/useRangePosition';
6
6
  import { DateRangePickerToolbarClasses } from './dateRangePickerToolbarClasses';
7
- export interface DateRangePickerToolbarProps<TDate extends PickerValidDate> extends Omit<BaseToolbarProps<DateRange<TDate>, 'day'>, 'views' | 'view' | 'onViewChange' | 'onChange' | 'isLandscape'>, Pick<UseRangePositionResponse, 'rangePosition' | 'onRangePositionChange'> {
8
- classes?: Partial<DateRangePickerToolbarClasses>;
7
+ export interface DateRangePickerToolbarProps<TDate extends PickerValidDate> extends ExportedDateRangePickerToolbarProps, Omit<BaseToolbarProps<DateRange<TDate>, 'day'>, 'onChange' | 'isLandscape'>, Pick<UseRangePositionResponse, 'rangePosition' | 'onRangePositionChange'> {
9
8
  }
10
9
  export interface ExportedDateRangePickerToolbarProps extends ExportedBaseToolbarProps {
10
+ /**
11
+ * Override or extend the styles applied to the component.
12
+ */
13
+ classes?: Partial<DateRangePickerToolbarClasses>;
11
14
  }
12
15
  /**
13
16
  * Demos:
@@ -1,6 +1,6 @@
1
1
  import _extends from "@babel/runtime/helpers/esm/extends";
2
2
  import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
3
- const _excluded = ["value", "rangePosition", "onRangePositionChange", "toolbarFormat", "className"];
3
+ const _excluded = ["value", "rangePosition", "onRangePositionChange", "toolbarFormat", "className", "onViewChange", "view", "views"];
4
4
  import * as React from 'react';
5
5
  import PropTypes from 'prop-types';
6
6
  import clsx from 'clsx';
@@ -93,6 +93,9 @@ process.env.NODE_ENV !== "production" ? DateRangePickerToolbar.propTypes = {
93
93
  // | These PropTypes are generated from the TypeScript type definitions |
94
94
  // | To update them edit the TypeScript types and run "yarn proptypes" |
95
95
  // ----------------------------------------------------------------------
96
+ /**
97
+ * Override or extend the styles applied to the component.
98
+ */
96
99
  classes: PropTypes.object,
97
100
  className: PropTypes.string,
98
101
  disabled: PropTypes.bool,
@@ -102,8 +105,17 @@ process.env.NODE_ENV !== "production" ? DateRangePickerToolbar.propTypes = {
102
105
  */
103
106
  hidden: PropTypes.bool,
104
107
  onRangePositionChange: PropTypes.func.isRequired,
108
+ /**
109
+ * Callback called when a toolbar is clicked
110
+ * @template TView
111
+ * @param {TView} view The view to open
112
+ */
113
+ onViewChange: PropTypes.func.isRequired,
105
114
  rangePosition: PropTypes.oneOf(['end', 'start']).isRequired,
106
115
  readOnly: PropTypes.bool,
116
+ /**
117
+ * The system prop that allows defining system overrides as well as additional CSS styles.
118
+ */
107
119
  sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),
108
120
  titleId: PropTypes.string,
109
121
  /**
@@ -115,6 +127,14 @@ process.env.NODE_ENV !== "production" ? DateRangePickerToolbar.propTypes = {
115
127
  * @default "––"
116
128
  */
117
129
  toolbarPlaceholder: PropTypes.node,
118
- value: PropTypes.arrayOf(PropTypes.object).isRequired
130
+ value: PropTypes.arrayOf(PropTypes.object).isRequired,
131
+ /**
132
+ * Currently visible picker view.
133
+ */
134
+ view: PropTypes.oneOf(['day']).isRequired,
135
+ /**
136
+ * Available views.
137
+ */
138
+ views: PropTypes.arrayOf(PropTypes.oneOf(['day'])).isRequired
119
139
  } : void 0;
120
140
  export { DateRangePickerToolbar };
@@ -1,7 +1,7 @@
1
1
  import * as React from 'react';
2
2
  import { PickerValidDate } from '@mui/x-date-pickers/models';
3
3
  import { DateTimeRangePickerProps } from './DateTimeRangePicker.types';
4
- type DateTimeRangePickerComponent = (<TDate extends PickerValidDate>(props: DateTimeRangePickerProps<TDate> & React.RefAttributes<HTMLDivElement>) => React.JSX.Element) & {
4
+ type DateTimeRangePickerComponent = (<TDate extends PickerValidDate, TEnableAccessibleFieldDOMStructure extends boolean = false>(props: DateTimeRangePickerProps<TDate, TEnableAccessibleFieldDOMStructure> & React.RefAttributes<HTMLDivElement>) => React.JSX.Element) & {
5
5
  propTypes?: any;
6
6
  };
7
7
  declare const DateTimeRangePicker: DateTimeRangePickerComponent;
@@ -3,6 +3,7 @@ import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWith
3
3
  const _excluded = ["desktopModeMediaQuery"];
4
4
  import * as React from 'react';
5
5
  import PropTypes from 'prop-types';
6
+ import { refType } from '@mui/utils';
6
7
  import useMediaQuery from '@mui/material/useMediaQuery';
7
8
  import { useThemeProps } from '@mui/material/styles';
8
9
  import { DesktopDateTimeRangePicker } from '../DesktopDateTimeRangePicker';
@@ -132,10 +133,13 @@ process.env.NODE_ENV !== "production" ? DateTimeRangePicker.propTypes = {
132
133
  * If `true`, the week number will be display in the calendar.
133
134
  */
134
135
  displayWeekNumber: PropTypes.bool,
136
+ /**
137
+ * @default false
138
+ */
139
+ enableAccessibleFieldDOMStructure: PropTypes.any,
135
140
  /**
136
141
  * The day view will show as many weeks as needed after the end of the current month to match this value.
137
142
  * Put it to 6 to have a fixed number of weeks in Gregorian calendars
138
- * @default undefined
139
143
  */
140
144
  fixedWeekNumber: PropTypes.number,
141
145
  /**
@@ -153,9 +157,7 @@ process.env.NODE_ENV !== "production" ? DateTimeRangePicker.propTypes = {
153
157
  * Pass a ref to the `input` element.
154
158
  * Ignored if the field has several inputs.
155
159
  */
156
- inputRef: PropTypes.oneOfType([PropTypes.func, PropTypes.shape({
157
- current: PropTypes.object
158
- })]),
160
+ inputRef: refType,
159
161
  /**
160
162
  * The label content.
161
163
  * Ignored if the field has several inputs.
@@ -299,17 +301,14 @@ process.env.NODE_ENV !== "production" ? DateTimeRangePicker.propTypes = {
299
301
  renderLoading: PropTypes.func,
300
302
  /**
301
303
  * The currently selected sections.
302
- * This prop accept four formats:
304
+ * This prop accepts four formats:
303
305
  * 1. If a number is provided, the section at this index will be selected.
304
- * 2. If an object with a `startIndex` and `endIndex` properties are provided, the sections between those two indexes will be selected.
305
- * 3. If a string of type `FieldSectionType` is provided, the first section with that name will be selected.
306
- * 4. If `null` is provided, no section will be selected
306
+ * 2. If a string of type `FieldSectionType` is provided, the first section with that name will be selected.
307
+ * 3. If `"all"` is provided, all the sections will be selected.
308
+ * 4. If `null` is provided, no section will be selected.
307
309
  * If not provided, the selected sections will be handled internally.
308
310
  */
309
- selectedSections: PropTypes.oneOfType([PropTypes.oneOf(['all', 'day', 'empty', 'hours', 'meridiem', 'minutes', 'month', 'seconds', 'weekDay', 'year']), PropTypes.number, PropTypes.shape({
310
- endIndex: PropTypes.number.isRequired,
311
- startIndex: PropTypes.number.isRequired
312
- })]),
311
+ selectedSections: PropTypes.oneOfType([PropTypes.oneOf(['all', 'day', 'empty', 'hours', 'meridiem', 'minutes', 'month', 'seconds', 'weekDay', 'year']), PropTypes.number]),
313
312
  /**
314
313
  * Disable specific date.
315
314
  *
@@ -3,9 +3,9 @@ import { DesktopDateTimeRangePickerProps, DesktopDateTimeRangePickerSlots, Deskt
3
3
  import { MobileDateTimeRangePickerProps, MobileDateTimeRangePickerSlots, MobileDateTimeRangePickerSlotProps } from '../MobileDateTimeRangePicker';
4
4
  export interface DateTimeRangePickerSlots<TDate extends PickerValidDate> extends DesktopDateTimeRangePickerSlots<TDate>, MobileDateTimeRangePickerSlots<TDate> {
5
5
  }
6
- export interface DateTimeRangePickerSlotProps<TDate extends PickerValidDate> extends DesktopDateTimeRangePickerSlotProps<TDate>, MobileDateTimeRangePickerSlotProps<TDate> {
6
+ export interface DateTimeRangePickerSlotProps<TDate extends PickerValidDate, TEnableAccessibleFieldDOMStructure extends boolean> extends DesktopDateTimeRangePickerSlotProps<TDate, TEnableAccessibleFieldDOMStructure>, MobileDateTimeRangePickerSlotProps<TDate, TEnableAccessibleFieldDOMStructure> {
7
7
  }
8
- export interface DateTimeRangePickerProps<TDate extends PickerValidDate> extends DesktopDateTimeRangePickerProps<TDate>, MobileDateTimeRangePickerProps<TDate> {
8
+ export interface DateTimeRangePickerProps<TDate extends PickerValidDate, TEnableAccessibleFieldDOMStructure extends boolean = false> extends DesktopDateTimeRangePickerProps<TDate, TEnableAccessibleFieldDOMStructure>, MobileDateTimeRangePickerProps<TDate, TEnableAccessibleFieldDOMStructure> {
9
9
  /**
10
10
  * CSS media query when `Mobile` mode will be changed to `Desktop`.
11
11
  * @default '@media (pointer: fine)'
@@ -21,5 +21,5 @@ export interface DateTimeRangePickerProps<TDate extends PickerValidDate> extends
21
21
  * The props used for each component slot.
22
22
  * @default {}
23
23
  */
24
- slotProps?: DateTimeRangePickerSlotProps<TDate>;
24
+ slotProps?: DateTimeRangePickerSlotProps<TDate, TEnableAccessibleFieldDOMStructure>;
25
25
  }
@@ -76,7 +76,8 @@ const DateTimeRangePickerTabs = function DateTimeRangePickerTabs(inProps) {
76
76
  hidden = typeof window === 'undefined' || window.innerHeight < 667,
77
77
  rangePosition,
78
78
  onRangePositionChange,
79
- className
79
+ className,
80
+ sx
80
81
  } = props;
81
82
  const localeText = useLocaleText();
82
83
  const classes = useUtilityClasses(props);
@@ -120,6 +121,7 @@ const DateTimeRangePickerTabs = function DateTimeRangePickerTabs(inProps) {
120
121
  return /*#__PURE__*/_jsxs(DateTimeRangePickerTabsRoot, {
121
122
  ownerState: props,
122
123
  className: clsx(classes.root, className),
124
+ sx: sx,
123
125
  children: [!isPreviousHidden ? /*#__PURE__*/_jsx(IconButton, {
124
126
  onClick: changeToPreviousTab,
125
127
  className: classes.navigationButton,
@@ -170,6 +172,10 @@ process.env.NODE_ENV !== "production" ? DateTimeRangePickerTabs.propTypes = {
170
172
  */
171
173
  onViewChange: PropTypes.func.isRequired,
172
174
  rangePosition: PropTypes.oneOf(['end', 'start']).isRequired,
175
+ /**
176
+ * The system prop that allows defining system overrides as well as additional CSS styles.
177
+ */
178
+ sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),
173
179
  /**
174
180
  * Time tab icon.
175
181
  * @default TimeIcon
@@ -10,6 +10,9 @@ export interface DateTimeRangePickerToolbarProps<TDate extends PickerValidDate>
10
10
  toolbarVariant?: WrapperVariant;
11
11
  }
12
12
  export interface ExportedDateTimeRangePickerToolbarProps extends ExportedBaseToolbarProps {
13
+ /**
14
+ * Override or extend the styles applied to the component.
15
+ */
13
16
  classes?: Partial<DateTimeRangePickerToolbarClasses>;
14
17
  }
15
18
  declare const DateTimeRangePickerToolbar: React.ForwardRefExoticComponent<DateTimeRangePickerToolbarProps<PickerValidDate> & React.RefAttributes<HTMLDivElement>>;
@@ -1,6 +1,6 @@
1
1
  import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
2
2
  import _extends from "@babel/runtime/helpers/esm/extends";
3
- const _excluded = ["value", "rangePosition", "onRangePositionChange", "className", "onViewChange", "toolbarVariant", "onChange", "classes", "view"];
3
+ const _excluded = ["value", "rangePosition", "onRangePositionChange", "className", "onViewChange", "toolbarVariant", "onChange", "classes", "view", "isLandscape", "views", "ampm", "disabled", "readOnly", "hidden", "toolbarFormat", "toolbarPlaceholder", "titleId", "sx"];
4
4
  import * as React from 'react';
5
5
  import PropTypes from 'prop-types';
6
6
  import clsx from 'clsx';
@@ -66,9 +66,29 @@ const DateTimeRangePickerToolbar = /*#__PURE__*/React.forwardRef(function DateTi
66
66
  className,
67
67
  onViewChange,
68
68
  onChange,
69
- view
69
+ view,
70
+ isLandscape,
71
+ views,
72
+ ampm,
73
+ disabled,
74
+ readOnly,
75
+ hidden,
76
+ toolbarFormat,
77
+ toolbarPlaceholder,
78
+ titleId,
79
+ sx
70
80
  } = props,
71
81
  other = _objectWithoutPropertiesLoose(props, _excluded);
82
+ const commonToolbarProps = {
83
+ isLandscape,
84
+ views,
85
+ ampm,
86
+ disabled,
87
+ readOnly,
88
+ hidden,
89
+ toolbarFormat,
90
+ toolbarPlaceholder
91
+ };
72
92
  const localeText = useLocaleText();
73
93
  const ownerState = props;
74
94
  const classes = useUtilityClasses(ownerState);
@@ -104,11 +124,16 @@ const DateTimeRangePickerToolbar = /*#__PURE__*/React.forwardRef(function DateTi
104
124
  onRangePositionChange(nextSelection);
105
125
  onChange(newRange);
106
126
  }, [onChange, onRangePositionChange, props.value, rangePosition, utils]);
107
- return /*#__PURE__*/_jsxs(DateTimeRangePickerToolbarRoot, {
127
+ if (hidden) {
128
+ return null;
129
+ }
130
+ return /*#__PURE__*/_jsxs(DateTimeRangePickerToolbarRoot, _extends({
108
131
  className: clsx(className, classes.root),
109
132
  ownerState: ownerState,
110
133
  ref: ref,
111
- children: [/*#__PURE__*/_jsx(DateTimeRangePickerToolbarStart, _extends({}, other, {
134
+ sx: sx
135
+ }, other, {
136
+ children: [/*#__PURE__*/_jsx(DateTimeRangePickerToolbarStart, _extends({
112
137
  value: start,
113
138
  onViewChange: handleStartRangeViewChange,
114
139
  toolbarTitle: localeText.start,
@@ -116,8 +141,9 @@ const DateTimeRangePickerToolbar = /*#__PURE__*/React.forwardRef(function DateTi
116
141
  toolbarVariant: "desktop",
117
142
  view: rangePosition === 'start' ? view : undefined,
118
143
  className: classes.startToolbar,
119
- onChange: handleOnChange
120
- })), /*#__PURE__*/_jsx(DateTimeRangePickerToolbarEnd, _extends({}, other, {
144
+ onChange: handleOnChange,
145
+ titleId: titleId ? `${titleId}-start-toolbar` : undefined
146
+ }, commonToolbarProps)), /*#__PURE__*/_jsx(DateTimeRangePickerToolbarEnd, _extends({
121
147
  value: end,
122
148
  onViewChange: handleEndRangeViewChange,
123
149
  toolbarTitle: localeText.end,
@@ -125,9 +151,10 @@ const DateTimeRangePickerToolbar = /*#__PURE__*/React.forwardRef(function DateTi
125
151
  toolbarVariant: "desktop",
126
152
  view: rangePosition === 'end' ? view : undefined,
127
153
  className: classes.endToolbar,
128
- onChange: handleOnChange
129
- }))]
130
- });
154
+ onChange: handleOnChange,
155
+ titleId: titleId ? `${titleId}-end-toolbar` : undefined
156
+ }, commonToolbarProps))]
157
+ }));
131
158
  });
132
159
  process.env.NODE_ENV !== "production" ? DateTimeRangePickerToolbar.propTypes = {
133
160
  // ----------------------------- Warning --------------------------------
@@ -135,6 +162,9 @@ process.env.NODE_ENV !== "production" ? DateTimeRangePickerToolbar.propTypes = {
135
162
  // | To update them edit the TypeScript types and run "yarn proptypes" |
136
163
  // ----------------------------------------------------------------------
137
164
  ampm: PropTypes.bool,
165
+ /**
166
+ * Override or extend the styles applied to the component.
167
+ */
138
168
  classes: PropTypes.object,
139
169
  className: PropTypes.string,
140
170
  disabled: PropTypes.bool,
@@ -154,6 +184,9 @@ process.env.NODE_ENV !== "production" ? DateTimeRangePickerToolbar.propTypes = {
154
184
  onViewChange: PropTypes.func.isRequired,
155
185
  rangePosition: PropTypes.oneOf(['end', 'start']).isRequired,
156
186
  readOnly: PropTypes.bool,
187
+ /**
188
+ * The system prop that allows defining system overrides as well as additional CSS styles.
189
+ */
157
190
  sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),
158
191
  titleId: PropTypes.string,
159
192
  /**
@@ -171,6 +204,9 @@ process.env.NODE_ENV !== "production" ? DateTimeRangePickerToolbar.propTypes = {
171
204
  * Currently visible picker view.
172
205
  */
173
206
  view: PropTypes.oneOf(['day', 'hours', 'meridiem', 'minutes', 'seconds']).isRequired,
207
+ /**
208
+ * Available views.
209
+ */
174
210
  views: PropTypes.arrayOf(PropTypes.oneOf(['day', 'hours', 'meridiem', 'minutes', 'seconds']).isRequired).isRequired
175
211
  } : void 0;
176
212
  export { DateTimeRangePickerToolbar };
@@ -4,7 +4,7 @@ import { useDefaultDates, useUtils, applyDefaultDate, applyDefaultViewProps, res
4
4
  import { DateTimeRangePickerToolbar } from './DateTimeRangePickerToolbar';
5
5
  import { DateTimeRangePickerTabs } from './DateTimeRangePickerTabs';
6
6
  export function useDateTimeRangePickerDefaultizedProps(props, name) {
7
- var _themeProps$ampm, _themeProps$disableFu, _themeProps$disablePa, _themeProps$slotProps;
7
+ var _themeProps$ampm, _themeProps$disableFu, _themeProps$disablePa, _themeProps$minDateTi, _themeProps$maxDateTi, _themeProps$minDateTi2, _themeProps$maxDateTi2, _themeProps$disableIg, _themeProps$slotProps;
8
8
  const utils = useUtils();
9
9
  const defaultDates = useDefaultDates();
10
10
  const themeProps = useThemeProps({
@@ -41,8 +41,13 @@ export function useDateTimeRangePickerDefaultizedProps(props, name) {
41
41
  ampm,
42
42
  disableFuture: (_themeProps$disableFu = themeProps.disableFuture) != null ? _themeProps$disableFu : false,
43
43
  disablePast: (_themeProps$disablePa = themeProps.disablePast) != null ? _themeProps$disablePa : false,
44
- minDate: applyDefaultDate(utils, themeProps.minDate, defaultDates.minDate),
45
- maxDate: applyDefaultDate(utils, themeProps.maxDate, defaultDates.maxDate),
44
+ minDate: applyDefaultDate(utils, (_themeProps$minDateTi = themeProps.minDateTime) != null ? _themeProps$minDateTi : themeProps.minDate, defaultDates.minDate),
45
+ maxDate: applyDefaultDate(utils, (_themeProps$maxDateTi = themeProps.maxDateTime) != null ? _themeProps$maxDateTi : themeProps.maxDate, defaultDates.maxDate),
46
+ minTime: (_themeProps$minDateTi2 = themeProps.minDateTime) != null ? _themeProps$minDateTi2 : themeProps.minTime,
47
+ maxTime: (_themeProps$maxDateTi2 = themeProps.maxDateTime) != null ? _themeProps$maxDateTi2 : themeProps.maxTime,
48
+ disableIgnoringDatePartForTimeValidation: (_themeProps$disableIg = themeProps.disableIgnoringDatePartForTimeValidation) != null ? _themeProps$disableIg : Boolean(themeProps.minDateTime || themeProps.maxDateTime ||
49
+ // allow digital clocks to correctly check time validity: https://github.com/mui/mui-x/issues/12048
50
+ themeProps.disablePast || themeProps.disableFuture),
46
51
  slots: _extends({
47
52
  tabs: DateTimeRangePickerTabs,
48
53
  toolbar: DateTimeRangePickerToolbar
@@ -1,7 +1,7 @@
1
1
  import * as React from 'react';
2
2
  import { PickerValidDate } from '@mui/x-date-pickers/models';
3
3
  import { DesktopDateRangePickerProps } from './DesktopDateRangePicker.types';
4
- type DesktopDateRangePickerComponent = (<TDate extends PickerValidDate>(props: DesktopDateRangePickerProps<TDate> & React.RefAttributes<HTMLDivElement>) => React.JSX.Element) & {
4
+ type DesktopDateRangePickerComponent = (<TDate extends PickerValidDate, TEnableAccessibleFieldDOMStructure extends boolean = false>(props: DesktopDateRangePickerProps<TDate, TEnableAccessibleFieldDOMStructure> & React.RefAttributes<HTMLDivElement>) => React.JSX.Element) & {
5
5
  propTypes?: any;
6
6
  };
7
7
  /**
@@ -142,10 +142,13 @@ DesktopDateRangePicker.propTypes = {
142
142
  * If `true`, the week number will be display in the calendar.
143
143
  */
144
144
  displayWeekNumber: PropTypes.bool,
145
+ /**
146
+ * @default false
147
+ */
148
+ enableAccessibleFieldDOMStructure: PropTypes.any,
145
149
  /**
146
150
  * The day view will show as many weeks as needed after the end of the current month to match this value.
147
151
  * Put it to 6 to have a fixed number of weeks in Gregorian calendars
148
- * @default undefined
149
152
  */
150
153
  fixedWeekNumber: PropTypes.number,
151
154
  /**
@@ -272,17 +275,14 @@ DesktopDateRangePicker.propTypes = {
272
275
  renderLoading: PropTypes.func,
273
276
  /**
274
277
  * The currently selected sections.
275
- * This prop accept four formats:
278
+ * This prop accepts four formats:
276
279
  * 1. If a number is provided, the section at this index will be selected.
277
- * 2. If an object with a `startIndex` and `endIndex` properties are provided, the sections between those two indexes will be selected.
278
- * 3. If a string of type `FieldSectionType` is provided, the first section with that name will be selected.
279
- * 4. If `null` is provided, no section will be selected
280
+ * 2. If a string of type `FieldSectionType` is provided, the first section with that name will be selected.
281
+ * 3. If `"all"` is provided, all the sections will be selected.
282
+ * 4. If `null` is provided, no section will be selected.
280
283
  * If not provided, the selected sections will be handled internally.
281
284
  */
282
- selectedSections: PropTypes.oneOfType([PropTypes.oneOf(['all', 'day', 'empty', 'hours', 'meridiem', 'minutes', 'month', 'seconds', 'weekDay', 'year']), PropTypes.number, PropTypes.shape({
283
- endIndex: PropTypes.number.isRequired,
284
- startIndex: PropTypes.number.isRequired
285
- })]),
285
+ selectedSections: PropTypes.oneOfType([PropTypes.oneOf(['all', 'day', 'empty', 'hours', 'meridiem', 'minutes', 'month', 'seconds', 'weekDay', 'year']), PropTypes.number]),
286
286
  /**
287
287
  * Disable specific date.
288
288
  *
@@ -4,9 +4,9 @@ import { UseDesktopRangePickerSlots, UseDesktopRangePickerSlotProps, DesktopRang
4
4
  import { BaseDateRangePickerProps, BaseDateRangePickerSlots, BaseDateRangePickerSlotProps } from '../DateRangePicker/shared';
5
5
  export interface DesktopDateRangePickerSlots<TDate extends PickerValidDate> extends BaseDateRangePickerSlots<TDate>, MakeOptional<UseDesktopRangePickerSlots<TDate, 'day'>, 'field'> {
6
6
  }
7
- export interface DesktopDateRangePickerSlotProps<TDate extends PickerValidDate> extends BaseDateRangePickerSlotProps<TDate>, Omit<UseDesktopRangePickerSlotProps<TDate, 'day'>, 'tabs'> {
7
+ export interface DesktopDateRangePickerSlotProps<TDate extends PickerValidDate, TEnableAccessibleFieldDOMStructure extends boolean> extends BaseDateRangePickerSlotProps<TDate>, Omit<UseDesktopRangePickerSlotProps<TDate, 'day', TEnableAccessibleFieldDOMStructure>, 'tabs' | 'toolbar'> {
8
8
  }
9
- export interface DesktopDateRangePickerProps<TDate extends PickerValidDate> extends BaseDateRangePickerProps<TDate>, DesktopRangeOnlyPickerProps<TDate> {
9
+ export interface DesktopDateRangePickerProps<TDate extends PickerValidDate, TEnableAccessibleFieldDOMStructure extends boolean = false> extends BaseDateRangePickerProps<TDate>, DesktopRangeOnlyPickerProps {
10
10
  /**
11
11
  * The number of calendars to render on **desktop**.
12
12
  * @default 2
@@ -21,5 +21,5 @@ export interface DesktopDateRangePickerProps<TDate extends PickerValidDate> exte
21
21
  * The props used for each component slot.
22
22
  * @default {}
23
23
  */
24
- slotProps?: DesktopDateRangePickerSlotProps<TDate>;
24
+ slotProps?: DesktopDateRangePickerSlotProps<TDate, TEnableAccessibleFieldDOMStructure>;
25
25
  }
@@ -1,7 +1,7 @@
1
1
  import * as React from 'react';
2
2
  import { PickerValidDate } from '@mui/x-date-pickers/models';
3
3
  import { DesktopDateTimeRangePickerProps } from './DesktopDateTimeRangePicker.types';
4
- type DesktopDateRangePickerComponent = (<TDate extends PickerValidDate>(props: DesktopDateTimeRangePickerProps<TDate> & React.RefAttributes<HTMLDivElement>) => React.JSX.Element) & {
4
+ type DesktopDateRangePickerComponent = (<TDate extends PickerValidDate, TEnableAccessibleFieldDOMStructure extends boolean = false>(props: DesktopDateTimeRangePickerProps<TDate, TEnableAccessibleFieldDOMStructure> & React.RefAttributes<HTMLDivElement>) => React.JSX.Element) & {
5
5
  propTypes?: any;
6
6
  };
7
7
  declare const DesktopDateTimeRangePicker: DesktopDateRangePickerComponent;
@@ -5,6 +5,7 @@ import * as React from 'react';
5
5
  import PropTypes from 'prop-types';
6
6
  import { extractValidationProps, isDatePickerView, isInternalTimeView } from '@mui/x-date-pickers/internals';
7
7
  import { resolveComponentProps } from '@mui/base/utils';
8
+ import { refType } from '@mui/utils';
8
9
  import { renderDigitalClockTimeView, renderMultiSectionDigitalClockTimeView } from '@mui/x-date-pickers/timeViewRenderers';
9
10
  import { multiSectionDigitalClockClasses, multiSectionDigitalClockSectionClasses } from '@mui/x-date-pickers/MultiSectionDigitalClock';
10
11
  import Divider from '@mui/material/Divider';
@@ -209,10 +210,13 @@ DesktopDateTimeRangePicker.propTypes = {
209
210
  * If `true`, the week number will be display in the calendar.
210
211
  */
211
212
  displayWeekNumber: PropTypes.bool,
213
+ /**
214
+ * @default false
215
+ */
216
+ enableAccessibleFieldDOMStructure: PropTypes.any,
212
217
  /**
213
218
  * The day view will show as many weeks as needed after the end of the current month to match this value.
214
219
  * Put it to 6 to have a fixed number of weeks in Gregorian calendars
215
- * @default undefined
216
220
  */
217
221
  fixedWeekNumber: PropTypes.number,
218
222
  /**
@@ -230,9 +234,7 @@ DesktopDateTimeRangePicker.propTypes = {
230
234
  * Pass a ref to the `input` element.
231
235
  * Ignored if the field has several inputs.
232
236
  */
233
- inputRef: PropTypes.oneOfType([PropTypes.func, PropTypes.shape({
234
- current: PropTypes.object
235
- })]),
237
+ inputRef: refType,
236
238
  /**
237
239
  * The label content.
238
240
  * Ignored if the field has several inputs.
@@ -376,17 +378,14 @@ DesktopDateTimeRangePicker.propTypes = {
376
378
  renderLoading: PropTypes.func,
377
379
  /**
378
380
  * The currently selected sections.
379
- * This prop accept four formats:
381
+ * This prop accepts four formats:
380
382
  * 1. If a number is provided, the section at this index will be selected.
381
- * 2. If an object with a `startIndex` and `endIndex` properties are provided, the sections between those two indexes will be selected.
382
- * 3. If a string of type `FieldSectionType` is provided, the first section with that name will be selected.
383
- * 4. If `null` is provided, no section will be selected
383
+ * 2. If a string of type `FieldSectionType` is provided, the first section with that name will be selected.
384
+ * 3. If `"all"` is provided, all the sections will be selected.
385
+ * 4. If `null` is provided, no section will be selected.
384
386
  * If not provided, the selected sections will be handled internally.
385
387
  */
386
- selectedSections: PropTypes.oneOfType([PropTypes.oneOf(['all', 'day', 'empty', 'hours', 'meridiem', 'minutes', 'month', 'seconds', 'weekDay', 'year']), PropTypes.number, PropTypes.shape({
387
- endIndex: PropTypes.number.isRequired,
388
- startIndex: PropTypes.number.isRequired
389
- })]),
388
+ selectedSections: PropTypes.oneOfType([PropTypes.oneOf(['all', 'day', 'empty', 'hours', 'meridiem', 'minutes', 'month', 'seconds', 'weekDay', 'year']), PropTypes.number]),
390
389
  /**
391
390
  * Disable specific date.
392
391
  *
@@ -5,9 +5,9 @@ import { BaseDateTimeRangePickerProps, BaseDateTimeRangePickerSlots, BaseDateTim
5
5
  import { DateTimeRangePickerView } from '../internals/models';
6
6
  export interface DesktopDateTimeRangePickerSlots<TDate extends PickerValidDate> extends BaseDateTimeRangePickerSlots<TDate>, MakeOptional<UseDesktopRangePickerSlots<TDate, DateTimeRangePickerView>, 'field'> {
7
7
  }
8
- export interface DesktopDateTimeRangePickerSlotProps<TDate extends PickerValidDate> extends BaseDateTimeRangePickerSlotProps<TDate>, Omit<UseDesktopRangePickerSlotProps<TDate, DateTimeRangePickerView>, 'tabs' | 'toolbar'> {
8
+ export interface DesktopDateTimeRangePickerSlotProps<TDate extends PickerValidDate, TEnableAccessibleFieldDOMStructure extends boolean> extends BaseDateTimeRangePickerSlotProps<TDate>, Omit<UseDesktopRangePickerSlotProps<TDate, DateTimeRangePickerView, TEnableAccessibleFieldDOMStructure>, 'tabs' | 'toolbar'> {
9
9
  }
10
- export interface DesktopDateTimeRangePickerProps<TDate extends PickerValidDate> extends BaseDateTimeRangePickerProps<TDate>, DesktopRangeOnlyPickerProps<TDate> {
10
+ export interface DesktopDateTimeRangePickerProps<TDate extends PickerValidDate, TEnableAccessibleFieldDOMStructure extends boolean = false> extends BaseDateTimeRangePickerProps<TDate>, DesktopRangeOnlyPickerProps {
11
11
  /**
12
12
  * The number of calendars to render on **desktop**.
13
13
  * @default 1
@@ -22,5 +22,5 @@ export interface DesktopDateTimeRangePickerProps<TDate extends PickerValidDate>
22
22
  * The props used for each component slot.
23
23
  * @default {}
24
24
  */
25
- slotProps?: DesktopDateTimeRangePickerSlotProps<TDate>;
25
+ slotProps?: DesktopDateTimeRangePickerSlotProps<TDate, TEnableAccessibleFieldDOMStructure>;
26
26
  }
@@ -1,7 +1,7 @@
1
1
  import * as React from 'react';
2
2
  import { PickerValidDate } from '@mui/x-date-pickers/models';
3
3
  import { MobileDateRangePickerProps } from './MobileDateRangePicker.types';
4
- type MobileDateRangePickerComponent = (<TDate extends PickerValidDate>(props: MobileDateRangePickerProps<TDate> & React.RefAttributes<HTMLDivElement>) => React.JSX.Element) & {
4
+ type MobileDateRangePickerComponent = (<TDate extends PickerValidDate, TEnableAccessibleFieldDOMStructure extends boolean = false>(props: MobileDateRangePickerProps<TDate, TEnableAccessibleFieldDOMStructure> & React.RefAttributes<HTMLDivElement>) => React.JSX.Element) & {
5
5
  propTypes?: any;
6
6
  };
7
7
  /**
@@ -138,10 +138,13 @@ MobileDateRangePicker.propTypes = {
138
138
  * If `true`, the week number will be display in the calendar.
139
139
  */
140
140
  displayWeekNumber: PropTypes.bool,
141
+ /**
142
+ * @default false
143
+ */
144
+ enableAccessibleFieldDOMStructure: PropTypes.any,
141
145
  /**
142
146
  * The day view will show as many weeks as needed after the end of the current month to match this value.
143
147
  * Put it to 6 to have a fixed number of weeks in Gregorian calendars
144
- * @default undefined
145
148
  */
146
149
  fixedWeekNumber: PropTypes.number,
147
150
  /**
@@ -268,17 +271,14 @@ MobileDateRangePicker.propTypes = {
268
271
  renderLoading: PropTypes.func,
269
272
  /**
270
273
  * The currently selected sections.
271
- * This prop accept four formats:
274
+ * This prop accepts four formats:
272
275
  * 1. If a number is provided, the section at this index will be selected.
273
- * 2. If an object with a `startIndex` and `endIndex` properties are provided, the sections between those two indexes will be selected.
274
- * 3. If a string of type `FieldSectionType` is provided, the first section with that name will be selected.
275
- * 4. If `null` is provided, no section will be selected
276
+ * 2. If a string of type `FieldSectionType` is provided, the first section with that name will be selected.
277
+ * 3. If `"all"` is provided, all the sections will be selected.
278
+ * 4. If `null` is provided, no section will be selected.
276
279
  * If not provided, the selected sections will be handled internally.
277
280
  */
278
- selectedSections: PropTypes.oneOfType([PropTypes.oneOf(['all', 'day', 'empty', 'hours', 'meridiem', 'minutes', 'month', 'seconds', 'weekDay', 'year']), PropTypes.number, PropTypes.shape({
279
- endIndex: PropTypes.number.isRequired,
280
- startIndex: PropTypes.number.isRequired
281
- })]),
281
+ selectedSections: PropTypes.oneOfType([PropTypes.oneOf(['all', 'day', 'empty', 'hours', 'meridiem', 'minutes', 'month', 'seconds', 'weekDay', 'year']), PropTypes.number]),
282
282
  /**
283
283
  * Disable specific date.
284
284
  *
@@ -4,9 +4,9 @@ import { UseMobileRangePickerSlots, UseMobileRangePickerSlotProps, MobileRangeOn
4
4
  import { BaseDateRangePickerProps, BaseDateRangePickerSlots, BaseDateRangePickerSlotProps } from '../DateRangePicker/shared';
5
5
  export interface MobileDateRangePickerSlots<TDate extends PickerValidDate> extends BaseDateRangePickerSlots<TDate>, MakeOptional<UseMobileRangePickerSlots<TDate, 'day'>, 'field'> {
6
6
  }
7
- export interface MobileDateRangePickerSlotProps<TDate extends PickerValidDate> extends BaseDateRangePickerSlotProps<TDate>, Omit<UseMobileRangePickerSlotProps<TDate, 'day'>, 'tabs'> {
7
+ export interface MobileDateRangePickerSlotProps<TDate extends PickerValidDate, TEnableAccessibleFieldDOMStructure extends boolean> extends BaseDateRangePickerSlotProps<TDate>, Omit<UseMobileRangePickerSlotProps<TDate, 'day', TEnableAccessibleFieldDOMStructure>, 'tabs' | 'toolbar'> {
8
8
  }
9
- export interface MobileDateRangePickerProps<TDate extends PickerValidDate> extends BaseDateRangePickerProps<TDate>, MobileRangeOnlyPickerProps<TDate> {
9
+ export interface MobileDateRangePickerProps<TDate extends PickerValidDate, TEnableAccessibleFieldDOMStructure extends boolean = false> extends BaseDateRangePickerProps<TDate>, MobileRangeOnlyPickerProps {
10
10
  /**
11
11
  * Overridable component slots.
12
12
  * @default {}
@@ -16,5 +16,5 @@ export interface MobileDateRangePickerProps<TDate extends PickerValidDate> exten
16
16
  * The props used for each component slot.
17
17
  * @default {}
18
18
  */
19
- slotProps?: MobileDateRangePickerSlotProps<TDate>;
19
+ slotProps?: MobileDateRangePickerSlotProps<TDate, TEnableAccessibleFieldDOMStructure>;
20
20
  }
@@ -1,7 +1,7 @@
1
1
  import * as React from 'react';
2
2
  import { PickerValidDate } from '@mui/x-date-pickers/models';
3
3
  import { MobileDateTimeRangePickerProps } from './MobileDateTimeRangePicker.types';
4
- type MobileDateRangePickerComponent = (<TDate extends PickerValidDate>(props: MobileDateTimeRangePickerProps<TDate> & React.RefAttributes<HTMLDivElement>) => React.JSX.Element) & {
4
+ type MobileDateRangePickerComponent = (<TDate extends PickerValidDate, TEnableAccessibleFieldDOMStructure extends boolean = false>(props: MobileDateTimeRangePickerProps<TDate, TEnableAccessibleFieldDOMStructure> & React.RefAttributes<HTMLDivElement>) => React.JSX.Element) & {
5
5
  propTypes?: any;
6
6
  };
7
7
  declare const MobileDateTimeRangePicker: MobileDateRangePickerComponent;