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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (149) hide show
  1. package/CHANGELOG.md +159 -1
  2. package/DateRangeCalendar/DateRangeCalendar.d.ts +2 -1
  3. package/DateRangeCalendar/DateRangeCalendar.js +6 -6
  4. package/DateRangeCalendar/DateRangeCalendar.types.d.ts +7 -7
  5. package/DateRangeCalendar/useDragRange.d.ts +4 -4
  6. package/DateRangePicker/DateRangePicker.d.ts +2 -1
  7. package/DateRangePicker/DateRangePicker.js +5 -5
  8. package/DateRangePicker/DateRangePicker.types.d.ts +4 -3
  9. package/DateRangePicker/DateRangePickerToolbar.d.ts +3 -2
  10. package/DateRangePicker/DateRangePickerToolbar.js +1 -1
  11. package/DateRangePicker/shared.d.ts +6 -5
  12. package/DateRangePickerDay/DateRangePickerDay.d.ts +3 -2
  13. package/DateRangePickerDay/DateRangePickerDay.js +2 -2
  14. package/DateTimeRangePicker/DateTimeRangePicker.d.ts +2 -1
  15. package/DateTimeRangePicker/DateTimeRangePicker.js +9 -9
  16. package/DateTimeRangePicker/DateTimeRangePicker.types.d.ts +4 -3
  17. package/DateTimeRangePicker/DateTimeRangePickerTimeWrapper.d.ts +3 -2
  18. package/DateTimeRangePicker/DateTimeRangePickerToolbar.d.ts +3 -2
  19. package/DateTimeRangePicker/DateTimeRangePickerToolbar.js +1 -1
  20. package/DateTimeRangePicker/shared.d.ts +6 -5
  21. package/DesktopDateRangePicker/DesktopDateRangePicker.d.ts +2 -1
  22. package/DesktopDateRangePicker/DesktopDateRangePicker.js +5 -5
  23. package/DesktopDateRangePicker/DesktopDateRangePicker.types.d.ts +4 -3
  24. package/DesktopDateTimeRangePicker/DesktopDateTimeRangePicker.d.ts +2 -1
  25. package/DesktopDateTimeRangePicker/DesktopDateTimeRangePicker.js +9 -9
  26. package/DesktopDateTimeRangePicker/DesktopDateTimeRangePicker.types.d.ts +4 -3
  27. package/DesktopDateTimeRangePicker/DesktopDateTimeRangePickerLayout.d.ts +2 -1
  28. package/MobileDateRangePicker/MobileDateRangePicker.d.ts +2 -1
  29. package/MobileDateRangePicker/MobileDateRangePicker.js +5 -5
  30. package/MobileDateRangePicker/MobileDateRangePicker.types.d.ts +4 -3
  31. package/MobileDateTimeRangePicker/MobileDateTimeRangePicker.d.ts +2 -1
  32. package/MobileDateTimeRangePicker/MobileDateTimeRangePicker.js +9 -9
  33. package/MobileDateTimeRangePicker/MobileDateTimeRangePicker.types.d.ts +4 -3
  34. package/MultiInputDateRangeField/MultiInputDateRangeField.d.ts +2 -1
  35. package/MultiInputDateRangeField/MultiInputDateRangeField.js +5 -5
  36. package/MultiInputDateRangeField/MultiInputDateRangeField.types.d.ts +7 -6
  37. package/MultiInputDateTimeRangeField/MultiInputDateTimeRangeField.d.ts +2 -1
  38. package/MultiInputDateTimeRangeField/MultiInputDateTimeRangeField.js +9 -9
  39. package/MultiInputDateTimeRangeField/MultiInputDateTimeRangeField.types.d.ts +8 -7
  40. package/MultiInputTimeRangeField/MultiInputTimeRangeField.d.ts +2 -1
  41. package/MultiInputTimeRangeField/MultiInputTimeRangeField.js +5 -5
  42. package/MultiInputTimeRangeField/MultiInputTimeRangeField.types.d.ts +8 -7
  43. package/SingleInputDateRangeField/SingleInputDateRangeField.d.ts +2 -1
  44. package/SingleInputDateRangeField/SingleInputDateRangeField.js +5 -5
  45. package/SingleInputDateRangeField/SingleInputDateRangeField.types.d.ts +7 -6
  46. package/SingleInputDateRangeField/useSingleInputDateRangeField.d.ts +3 -2
  47. package/SingleInputDateTimeRangeField/SingleInputDateTimeRangeField.d.ts +2 -1
  48. package/SingleInputDateTimeRangeField/SingleInputDateTimeRangeField.js +9 -9
  49. package/SingleInputDateTimeRangeField/SingleInputDateTimeRangeField.types.d.ts +7 -6
  50. package/SingleInputDateTimeRangeField/useSingleInputDateTimeRangeField.d.ts +3 -2
  51. package/SingleInputTimeRangeField/SingleInputTimeRangeField.d.ts +2 -1
  52. package/SingleInputTimeRangeField/SingleInputTimeRangeField.js +5 -5
  53. package/SingleInputTimeRangeField/SingleInputTimeRangeField.types.d.ts +7 -6
  54. package/SingleInputTimeRangeField/useSingleInputTimeRangeField.d.ts +3 -2
  55. package/StaticDateRangePicker/StaticDateRangePicker.d.ts +2 -1
  56. package/StaticDateRangePicker/StaticDateRangePicker.js +5 -5
  57. package/StaticDateRangePicker/StaticDateRangePicker.types.d.ts +4 -3
  58. package/dateRangeViewRenderers/dateRangeViewRenderers.d.ts +3 -2
  59. package/index.d.ts +7 -1
  60. package/index.js +7 -2
  61. package/internals/hooks/models/useRangePicker.d.ts +6 -5
  62. package/internals/hooks/useDesktopRangePicker/useDesktopRangePicker.d.ts +2 -1
  63. package/internals/hooks/useDesktopRangePicker/useDesktopRangePicker.js +1 -1
  64. package/internals/hooks/useDesktopRangePicker/useDesktopRangePicker.types.d.ts +6 -5
  65. package/internals/hooks/useEnrichedRangePickerFieldProps.d.ts +4 -4
  66. package/internals/hooks/useMobileRangePicker/useMobileRangePicker.d.ts +2 -1
  67. package/internals/hooks/useMobileRangePicker/useMobileRangePicker.js +1 -1
  68. package/internals/hooks/useMobileRangePicker/useMobileRangePicker.types.d.ts +6 -5
  69. package/internals/hooks/useMultiInputRangeField/useMultiInputDateRangeField.d.ts +2 -1
  70. package/internals/hooks/useMultiInputRangeField/useMultiInputDateTimeRangeField.d.ts +3 -2
  71. package/internals/hooks/useMultiInputRangeField/useMultiInputTimeRangeField.d.ts +3 -2
  72. package/internals/hooks/useStaticRangePicker/useStaticRangePicker.d.ts +2 -1
  73. package/internals/hooks/useStaticRangePicker/useStaticRangePicker.types.d.ts +5 -4
  74. package/internals/models/dateRange.d.ts +4 -3
  75. package/internals/models/dateTimeRange.d.ts +3 -2
  76. package/internals/models/fields.d.ts +2 -2
  77. package/internals/models/timeRange.d.ts +3 -2
  78. package/internals/utils/date-range-manager.d.ts +5 -5
  79. package/internals/utils/date-utils.d.ts +5 -5
  80. package/internals/utils/releaseInfo.js +1 -1
  81. package/internals/utils/validation/validateDateRange.d.ts +2 -2
  82. package/internals/utils/validation/validateDateTimeRange.d.ts +2 -2
  83. package/internals/utils/valueManagers.d.ts +2 -1
  84. package/legacy/DateRangeCalendar/DateRangeCalendar.js +6 -6
  85. package/legacy/DateRangePicker/DateRangePicker.js +5 -5
  86. package/legacy/DateRangePicker/DateRangePickerToolbar.js +1 -1
  87. package/legacy/DateRangePickerDay/DateRangePickerDay.js +2 -2
  88. package/legacy/DateTimeRangePicker/DateTimeRangePicker.js +9 -9
  89. package/legacy/DateTimeRangePicker/DateTimeRangePickerToolbar.js +1 -1
  90. package/legacy/DesktopDateRangePicker/DesktopDateRangePicker.js +5 -5
  91. package/legacy/DesktopDateTimeRangePicker/DesktopDateTimeRangePicker.js +9 -9
  92. package/legacy/MobileDateRangePicker/MobileDateRangePicker.js +5 -5
  93. package/legacy/MobileDateTimeRangePicker/MobileDateTimeRangePicker.js +9 -9
  94. package/legacy/MultiInputDateRangeField/MultiInputDateRangeField.js +5 -5
  95. package/legacy/MultiInputDateTimeRangeField/MultiInputDateTimeRangeField.js +9 -9
  96. package/legacy/MultiInputTimeRangeField/MultiInputTimeRangeField.js +5 -5
  97. package/legacy/SingleInputDateRangeField/SingleInputDateRangeField.js +5 -5
  98. package/legacy/SingleInputDateTimeRangeField/SingleInputDateTimeRangeField.js +9 -9
  99. package/legacy/SingleInputTimeRangeField/SingleInputTimeRangeField.js +5 -5
  100. package/legacy/StaticDateRangePicker/StaticDateRangePicker.js +5 -5
  101. package/legacy/index.js +21 -2
  102. package/legacy/internals/hooks/useDesktopRangePicker/useDesktopRangePicker.js +1 -1
  103. package/legacy/internals/hooks/useMobileRangePicker/useMobileRangePicker.js +1 -1
  104. package/legacy/internals/utils/releaseInfo.js +1 -1
  105. package/models/range.d.ts +3 -2
  106. package/modern/DateRangeCalendar/DateRangeCalendar.js +6 -6
  107. package/modern/DateRangePicker/DateRangePicker.js +5 -5
  108. package/modern/DateRangePicker/DateRangePickerToolbar.js +1 -1
  109. package/modern/DateRangePickerDay/DateRangePickerDay.js +2 -2
  110. package/modern/DateTimeRangePicker/DateTimeRangePicker.js +9 -9
  111. package/modern/DateTimeRangePicker/DateTimeRangePickerToolbar.js +1 -1
  112. package/modern/DesktopDateRangePicker/DesktopDateRangePicker.js +5 -5
  113. package/modern/DesktopDateTimeRangePicker/DesktopDateTimeRangePicker.js +9 -9
  114. package/modern/MobileDateRangePicker/MobileDateRangePicker.js +5 -5
  115. package/modern/MobileDateTimeRangePicker/MobileDateTimeRangePicker.js +9 -9
  116. package/modern/MultiInputDateRangeField/MultiInputDateRangeField.js +5 -5
  117. package/modern/MultiInputDateTimeRangeField/MultiInputDateTimeRangeField.js +9 -9
  118. package/modern/MultiInputTimeRangeField/MultiInputTimeRangeField.js +5 -5
  119. package/modern/SingleInputDateRangeField/SingleInputDateRangeField.js +5 -5
  120. package/modern/SingleInputDateTimeRangeField/SingleInputDateTimeRangeField.js +9 -9
  121. package/modern/SingleInputTimeRangeField/SingleInputTimeRangeField.js +5 -5
  122. package/modern/StaticDateRangePicker/StaticDateRangePicker.js +5 -5
  123. package/modern/index.js +7 -2
  124. package/modern/internals/hooks/useDesktopRangePicker/useDesktopRangePicker.js +1 -1
  125. package/modern/internals/hooks/useMobileRangePicker/useMobileRangePicker.js +1 -1
  126. package/modern/internals/utils/releaseInfo.js +1 -1
  127. package/node/DateRangeCalendar/DateRangeCalendar.js +7 -7
  128. package/node/DateRangePicker/DateRangePicker.js +5 -5
  129. package/node/DateRangePicker/DateRangePickerToolbar.js +1 -1
  130. package/node/DateRangePickerDay/DateRangePickerDay.js +3 -3
  131. package/node/DateTimeRangePicker/DateTimeRangePicker.js +9 -9
  132. package/node/DateTimeRangePicker/DateTimeRangePickerToolbar.js +1 -1
  133. package/node/DesktopDateRangePicker/DesktopDateRangePicker.js +5 -5
  134. package/node/DesktopDateTimeRangePicker/DesktopDateTimeRangePicker.js +9 -9
  135. package/node/MobileDateRangePicker/MobileDateRangePicker.js +5 -5
  136. package/node/MobileDateTimeRangePicker/MobileDateTimeRangePicker.js +9 -9
  137. package/node/MultiInputDateRangeField/MultiInputDateRangeField.js +5 -5
  138. package/node/MultiInputDateTimeRangeField/MultiInputDateTimeRangeField.js +9 -9
  139. package/node/MultiInputTimeRangeField/MultiInputTimeRangeField.js +5 -5
  140. package/node/SingleInputDateRangeField/SingleInputDateRangeField.js +5 -5
  141. package/node/SingleInputDateTimeRangeField/SingleInputDateTimeRangeField.js +9 -9
  142. package/node/SingleInputTimeRangeField/SingleInputTimeRangeField.js +5 -5
  143. package/node/StaticDateRangePicker/StaticDateRangePicker.js +5 -5
  144. package/node/index.js +18 -9
  145. package/node/internals/hooks/useDesktopRangePicker/useDesktopRangePicker.js +2 -2
  146. package/node/internals/hooks/useMobileRangePicker/useMobileRangePicker.js +2 -2
  147. package/node/internals/utils/releaseInfo.js +1 -1
  148. package/package.json +3 -3
  149. package/themeAugmentation/props.d.ts +17 -17
package/CHANGELOG.md CHANGED
@@ -3,6 +3,108 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## v7.0.0-beta.2
7
+
8
+ _Feb 9, 2024_
9
+
10
+ We'd like to offer a big thanks to the 15 contributors who made this release possible. Here are some highlights ✨:
11
+
12
+ - 🚀 Add slot typings on the Data Grid components (#11795) @romgrk
13
+ - 🎁 Support UTC date formatting in Charts tooltip (#11943) @shaharyar-shamshi
14
+ - 🌍 Improve Danish (da-DK) locale Data Grid (#11877) @ShahrazH
15
+ - 🐞 Bugfixes
16
+ - 📚 Documentation improvements
17
+
18
+ ### Data Grid
19
+
20
+ #### `@mui/x-data-grid@v7.0.0-beta.2`
21
+
22
+ - [DataGrid] Add `removeAllFilterItems` as a reason of `onFilterModelChange` callback (#11911) @shaharyar-shamshi
23
+ - [DataGrid] Add slot typings (#11795) @romgrk
24
+ - [DataGrid] Add support for dialogs in menu actions (#11909) @cherniavskii
25
+ - [DataGrid] Allow passing readonly arrays to `pageSizeOptions` prop (#11609) @pcorpet
26
+ - [DataGrid] Fix incorrect computation of `lastPage` in `GridPagination` (#11958) @MBilalShafi
27
+ - [DataGrid] Improve vertical scrolling performance (#11924) @romgrk
28
+ - [l10n] Improve Danish (da-DK) locale (#11877) @ShahrazH
29
+
30
+ #### `@mui/x-data-grid-pro@v7.0.0-beta.2` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
31
+
32
+ Same changes as in `@mui/x-data-grid@v7.0.0-beta.2`.
33
+
34
+ #### `@mui/x-data-grid-premium@v7.0.0-beta.2` [![premium](https://mui.com/r/x-premium-svg)](https://mui.com/r/x-premium-svg-link 'Premium plan')
35
+
36
+ Same changes as in `@mui/x-data-grid-pro@v7.0.0-beta.2`, plus:
37
+
38
+ - [DataGridPremium] Fix autosize grouping cell (#11870) @romgrk
39
+ - [DataGridPremium] Fix clipboard paste not working with Caps Lock enabled (#11965) @shaharyar-shamshi
40
+
41
+ ### Date Pickers
42
+
43
+ #### `@mui/x-date-pickers@v7.0.0-beta.2`
44
+
45
+ - [pickers] Avoid relying on locale in Luxon `isWithinRange` method (#11936) @LukasTy
46
+ - [pickers] Limit the valid values of `TDate` (#11791) @flaviendelangle
47
+
48
+ #### `@mui/x-date-pickers-pro@v7.0.0-beta.2` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
49
+
50
+ Same changes as in `@mui/x-date-pickers@v7.0.0-beta.2`.
51
+
52
+ ### Charts / `@mui/x-charts@v7.0.0-beta.2`
53
+
54
+ - [charts] Add `reverse` property to axes (#11899) @alexfauquette
55
+ - [charts] Allow series ids to be numbers (#11941) @alexfauquette
56
+ - [charts] Support UTC date formatting in tooltip (#11943) @shaharyar-shamshi
57
+
58
+ ### Tree View / `@mui/x-tree-view@v7.0.0-beta.2`
59
+
60
+ - [TreeView] Correctly detect if an item is expandable (#11963) @swalker326
61
+ - [TreeView] Polish the default design & revise the simple version pages (#11529) @danilo-leal
62
+
63
+ ### License
64
+
65
+ #### Breaking changes
66
+
67
+ - If you're using the [commercial license](https://next.mui.com/x/introduction/licensing), you need to update the import path:
68
+
69
+ ```diff
70
+ -import { LicenseInfo } from '@mui/x-license-pro';
71
+ +import { LicenseInfo } from '@mui/x-license';
72
+ ```
73
+
74
+ `@mui/x-license@v7.0.0-beta.2`
75
+
76
+ - [license] Rename `@mui/x-license-pro` to `@mui/x-license` (#11938) @cherniavskii
77
+
78
+ ### Docs
79
+
80
+ - [docs] Add a note about `AdapterDateFnsV3` on the Getting Started page (#11985) @flaviendelangle
81
+ - [docs] Add missing `Charts` breaking change steps (#11971) @alexfauquette
82
+ - [docs] Fix `ChartsTooltip` typo (#11961) @thisisharsh7
83
+ - [docs] Refactor `Localization` documentation sections (#11989) @LukasTy
84
+ - [docs] Use "cannot" instead of "can't" or "can not" (#11986) @flaviendelangle
85
+ - [docs] Add quick fixes to the migration guide (#11806) @danilo-leal
86
+ - [docs] Avoid use of shorthand (#12000) @oliviertassinari
87
+ - [docs] Avoid the use of MUI Core @oliviertassinari
88
+ - [docs] Fix image size and dark mode @oliviertassinari
89
+ - [docs] Follow blank line convention with use client @oliviertassinari
90
+ - [docs] Stable layout between light and dark mode @oliviertassinari
91
+
92
+ ### Core
93
+
94
+ - [core] Add `docs:serve` script (#11935) @cherniavskii
95
+ - [core] Bump monorepo (#12001) @cherniavskii
96
+ - [core] Deprecate `LicenseInfo` re-exports (#11956) @cherniavskii
97
+ - [core] Fix `test_types` failing on the `next` branch (#11944) @cherniavskii
98
+ - [core] Fix failing `test_static` on the next branch (#11977) @cherniavskii
99
+ - [core] Flatten grid packages folder (#11946) @cherniavskii
100
+ - [core] Improve license info deprecation message (#11974) @cherniavskii
101
+ - [core] Integrate changes from Core #40842 PR (#11801) @michaldudak
102
+ - [core] Move next config to ESM (#11882) @Janpot
103
+ - [core] Add auto-message on closed issues (#11805) @michelengelen
104
+ - [core] Simplify bug reproduction (#11849) @oliviertassinari
105
+ - [core] Fix npm reference @oliviertassinari
106
+ - [core] Normalize issue template @oliviertassinari
107
+
6
108
  ## 7.0.0-beta.1
7
109
 
8
110
  _Feb 1, 2024_
@@ -2036,6 +2138,62 @@ Here is an example of the renaming for the `<ChartsTooltip />` component.
2036
2138
  - [core] Update release instructions as per v7 configuration (#10962) @MBilalShafi
2037
2139
  - [license] Correctly throw errors (#10924) @oliviertassinari
2038
2140
 
2141
+ ## v6.19.4
2142
+
2143
+ _Feb 9, 2024_
2144
+
2145
+ We'd like to offer a big thanks to the 10 contributors who made this release possible. Here are some highlights ✨:
2146
+
2147
+ - 🌍 Improve Danish (da-DK) locale on the Data Grid (#11972) @ShahrazH
2148
+ - 🐞 Bugfixes
2149
+ - 📚 Documentation improvements
2150
+
2151
+ ### Data Grid
2152
+
2153
+ #### `@mui/x-data-grid@v6.19.4`
2154
+
2155
+ - [DataGrid] Add support for dialogs in menu actions (#11937) @cherniavskii
2156
+ - [DataGrid] Allow passing readonly arrays to `pageSizeOptions` prop (#11992) @pcorpet
2157
+ - [DataGrid] Fix row reorder with cell selection (#11878) @PEsteves8
2158
+ - [DataGrid] Replace `eval` with `new Function` (#11962) @cherniavskii
2159
+ - [l10n] Improve Danish (da-DK) locale (#11972) @ShahrazH
2160
+
2161
+ #### `@mui/x-data-grid-pro@v6.19.4` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
2162
+
2163
+ Same changes as in `@mui/x-data-grid@v6.19.4`.
2164
+
2165
+ #### `@mui/x-data-grid-premium@v6.19.4` [![premium](https://mui.com/r/x-premium-svg)](https://mui.com/r/x-premium-svg-link 'Premium plan')
2166
+
2167
+ Same changes as in `@mui/x-data-grid-pro@v6.19.4`, plus:
2168
+
2169
+ - [DataGridPremium] Fix autosize grouping cell (#11990) @romgrk
2170
+ - [DataGridPremium] Fix error after closing print export (#11889) @cherniavskii
2171
+
2172
+ ### Date Pickers
2173
+
2174
+ #### `@mui/x-date-pickers@v6.19.4`
2175
+
2176
+ - [pickers] Avoid relying on locale in Luxon `isWithinRange` method (#11940) @LukasTy
2177
+
2178
+ #### `@mui/x-date-pickers-pro@v6.19.4` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
2179
+
2180
+ Same changes as in `@mui/x-date-pickers@v6.19.4`.
2181
+
2182
+ ### Charts / `@mui/x-charts@v6.19.4`
2183
+
2184
+ - [charts] Add `reverse` property to axes (#11959) @alexfauquette
2185
+ - [charts] Allow series ids to be numbers (#11960) @alexfauquette
2186
+ - [charts] Fix Proptypes error by supporting string values for axes (#11953) @alexfauquette
2187
+
2188
+ ### Docs
2189
+
2190
+ - [docs] Add a note about `AdapterDateFnsV3` on the Getting Started page (#11987) @flaviendelangle
2191
+ - [docs] Avoid the use of MUI Core @oliviertassinari
2192
+ - [docs] Fix API links (#11930) @alexfauquette
2193
+ - [docs] Fix `ChartsTooltip` typo (#11967) @thisisharsh7
2194
+ - [docs] Refactor `Localization` documentation sections (#11997) @LukasTy
2195
+ - [code] Simplify bug reproduction (#11932) @alexfauquette
2196
+
2039
2197
  ## 6.19.3
2040
2198
 
2041
2199
  _Feb 1, 2024_
@@ -7123,7 +7281,7 @@ You can find more information about the new api, including how to set those tran
7123
7281
  - [core] Add link to the security page on the `README` (#6073) @oliviertassinari
7124
7282
  - [core] Fix scroll restoration in the docs (#5938) @oliviertassinari
7125
7283
  - [core] Remove the Storybook (#6099) @flaviendelangle
7126
- - [core] Tag release as `next` in NPM (#6256) @m4theushw
7284
+ - [core] Tag release as `next` in npm (#6256) @m4theushw
7127
7285
  - [core] Update monorepo (#6180) @flaviendelangle
7128
7286
  - [core] Use the `next` branch for Prettier (#6097) @flaviendelangle
7129
7287
  - [core] Use the official repository for `@mui/monorepo` instead of a fork (#6189) @oliviertassinari
@@ -1,6 +1,7 @@
1
1
  import * as React from 'react';
2
+ import { PickerValidDate } from '@mui/x-date-pickers/models';
2
3
  import { DateRangeCalendarProps } from './DateRangeCalendar.types';
3
- type DateRangeCalendarComponent = (<TDate>(props: DateRangeCalendarProps<TDate> & React.RefAttributes<HTMLDivElement>) => React.JSX.Element) & {
4
+ type DateRangeCalendarComponent = (<TDate extends PickerValidDate>(props: DateRangeCalendarProps<TDate> & React.RefAttributes<HTMLDivElement>) => React.JSX.Element) & {
4
5
  propTypes?: any;
5
6
  };
6
7
  /**
@@ -10,7 +10,7 @@ import useMediaQuery from '@mui/material/useMediaQuery';
10
10
  import { resolveComponentProps, useSlotProps } from '@mui/base/utils';
11
11
  import { styled, useThemeProps } from '@mui/material/styles';
12
12
  import { unstable_composeClasses as composeClasses } from '@mui/utils';
13
- import { Watermark } from '@mui/x-license-pro';
13
+ import { Watermark } from '@mui/x-license';
14
14
  import { PickersCalendarHeader } from '@mui/x-date-pickers/PickersCalendarHeader';
15
15
  import { applyDefaultDate, DayCalendar, useDefaultReduceAnimations, PickersArrowSwitcher, useCalendarState, useDefaultDates, useLocaleText, useNextMonthDisabled, usePreviousMonthDisabled, useUtils, useNow, DEFAULT_DESKTOP_MODE_MEDIA_QUERY, buildWarning, useControlledValueWithTimezone, useViews } from '@mui/x-date-pickers/internals';
16
16
  import { getReleaseInfo } from '../internals/utils/releaseInfo';
@@ -558,7 +558,7 @@ process.env.NODE_ENV !== "production" ? DateRangeCalendar.propTypes = {
558
558
  * The default selected value.
559
559
  * Used when the component is not controlled.
560
560
  */
561
- defaultValue: PropTypes.arrayOf(PropTypes.any),
561
+ defaultValue: PropTypes.arrayOf(PropTypes.object),
562
562
  /**
563
563
  * If `true`, after selecting `start` date calendar will not automatically switch to the month of `end` date.
564
564
  * @default false
@@ -612,11 +612,11 @@ process.env.NODE_ENV !== "production" ? DateRangeCalendar.propTypes = {
612
612
  /**
613
613
  * Maximal selectable date.
614
614
  */
615
- maxDate: PropTypes.any,
615
+ maxDate: PropTypes.object,
616
616
  /**
617
617
  * Minimal selectable date.
618
618
  */
619
- minDate: PropTypes.any,
619
+ minDate: PropTypes.object,
620
620
  /**
621
621
  * Callback fired when the value changes.
622
622
  * @template TValue The value type. Will be either the same type as `value` or `null`. Can be in `[start, end]` format in case of range value.
@@ -675,7 +675,7 @@ process.env.NODE_ENV !== "production" ? DateRangeCalendar.propTypes = {
675
675
  * The date used to generate the new value when both `value` and `defaultValue` are empty.
676
676
  * @default The closest valid date using the validation props, except callbacks such as `shouldDisableDate`.
677
677
  */
678
- referenceDate: PropTypes.any,
678
+ referenceDate: PropTypes.object,
679
679
  /**
680
680
  * Component rendered on the "day" view when `props.loading` is true.
681
681
  * @returns {React.ReactNode} The node to render when loading.
@@ -730,7 +730,7 @@ process.env.NODE_ENV !== "production" ? DateRangeCalendar.propTypes = {
730
730
  * The selected value.
731
731
  * Used when the component is controlled.
732
732
  */
733
- value: PropTypes.arrayOf(PropTypes.any),
733
+ value: PropTypes.arrayOf(PropTypes.object),
734
734
  /**
735
735
  * The visible view.
736
736
  * Used when the component view is controlled.
@@ -2,7 +2,7 @@ import * as React from 'react';
2
2
  import { SxProps } from '@mui/system';
3
3
  import { SlotComponentProps } from '@mui/base/utils';
4
4
  import { Theme } from '@mui/material/styles';
5
- import { TimezoneProps } from '@mui/x-date-pickers/models';
5
+ import { PickerValidDate, TimezoneProps } from '@mui/x-date-pickers/models';
6
6
  import { PickersCalendarHeader, PickersCalendarHeaderProps, PickersCalendarHeaderSlots, PickersCalendarHeaderSlotProps } from '@mui/x-date-pickers/PickersCalendarHeader';
7
7
  import { BaseDateValidationProps, DefaultizedProps, ExportedDayCalendarProps, DayCalendarSlots, DayCalendarSlotProps, PickersArrowSwitcherSlots, PickersArrowSwitcherSlotProps, DayCalendarProps, ExportedUseViewsOptions } from '@mui/x-date-pickers/internals';
8
8
  import { DayRangeValidationProps } from '../internals/models';
@@ -11,7 +11,7 @@ import { DateRangeCalendarClasses } from './dateRangeCalendarClasses';
11
11
  import { DateRangePickerDay, DateRangePickerDayProps } from '../DateRangePickerDay';
12
12
  import { UseRangePositionProps } from '../internals/hooks/useRangePosition';
13
13
  export type DateRangePosition = 'start' | 'end';
14
- export interface DateRangeCalendarSlots<TDate> extends PickersArrowSwitcherSlots, Omit<DayCalendarSlots<TDate>, 'day'>, PickersCalendarHeaderSlots {
14
+ export interface DateRangeCalendarSlots<TDate extends PickerValidDate> extends PickersArrowSwitcherSlots, Omit<DayCalendarSlots<TDate>, 'day'>, PickersCalendarHeaderSlots {
15
15
  /**
16
16
  * Custom component for calendar header.
17
17
  * Check the [PickersCalendarHeader](https://mui.com/x/api/date-pickers/pickers-calendar-header/) component.
@@ -25,14 +25,14 @@ export interface DateRangeCalendarSlots<TDate> extends PickersArrowSwitcherSlots
25
25
  */
26
26
  day?: React.ElementType<DateRangePickerDayProps<TDate>>;
27
27
  }
28
- export interface DateRangeCalendarSlotProps<TDate> extends PickersArrowSwitcherSlotProps, Omit<DayCalendarSlotProps<TDate>, 'day'>, PickersCalendarHeaderSlotProps<TDate> {
28
+ export interface DateRangeCalendarSlotProps<TDate extends PickerValidDate> extends PickersArrowSwitcherSlotProps, Omit<DayCalendarSlotProps<TDate>, 'day'>, PickersCalendarHeaderSlotProps<TDate> {
29
29
  calendarHeader?: SlotComponentProps<typeof PickersCalendarHeader, {}, DateRangeCalendarProps<TDate>>;
30
30
  day?: SlotComponentProps<typeof DateRangePickerDay, {}, DayCalendarProps<TDate> & {
31
31
  day: TDate;
32
32
  selected: boolean;
33
33
  }>;
34
34
  }
35
- export interface ExportedDateRangeCalendarProps<TDate> extends ExportedDayCalendarProps<TDate>, BaseDateValidationProps<TDate>, DayRangeValidationProps<TDate>, TimezoneProps {
35
+ export interface ExportedDateRangeCalendarProps<TDate extends PickerValidDate> extends ExportedDayCalendarProps<TDate>, BaseDateValidationProps<TDate>, DayRangeValidationProps<TDate>, TimezoneProps {
36
36
  /**
37
37
  * If `true`, after selecting `start` date calendar will not automatically switch to the month of `end` date.
38
38
  * @default false
@@ -70,7 +70,7 @@ export interface ExportedDateRangeCalendarProps<TDate> extends ExportedDayCalend
70
70
  */
71
71
  disableDragEditing?: boolean;
72
72
  }
73
- export interface DateRangeCalendarProps<TDate> extends ExportedDateRangeCalendarProps<TDate>, UseRangePositionProps, ExportedUseViewsOptions<'day'> {
73
+ export interface DateRangeCalendarProps<TDate extends PickerValidDate> extends ExportedDateRangeCalendarProps<TDate>, UseRangePositionProps, ExportedUseViewsOptions<'day'> {
74
74
  /**
75
75
  * The selected value.
76
76
  * Used when the component is controlled.
@@ -116,7 +116,7 @@ export interface DateRangeCalendarProps<TDate> extends ExportedDateRangeCalendar
116
116
  */
117
117
  availableRangePositions?: DateRangePosition[];
118
118
  }
119
- export interface DateRangeCalendarOwnerState<TDate> extends DateRangeCalendarProps<TDate> {
119
+ export interface DateRangeCalendarOwnerState<TDate extends PickerValidDate> extends DateRangeCalendarProps<TDate> {
120
120
  isDragging: boolean;
121
121
  }
122
- export type DateRangeCalendarDefaultizedProps<TDate> = DefaultizedProps<DateRangeCalendarProps<TDate>, 'views' | 'openTo' | 'reduceAnimations' | 'calendars' | 'disableDragEditing' | 'availableRangePositions' | keyof BaseDateValidationProps<TDate>>;
122
+ export type DateRangeCalendarDefaultizedProps<TDate extends PickerValidDate> = DefaultizedProps<DateRangeCalendarProps<TDate>, 'views' | 'openTo' | 'reduceAnimations' | 'calendars' | 'disableDragEditing' | 'availableRangePositions' | keyof BaseDateValidationProps<TDate>>;
@@ -1,8 +1,8 @@
1
1
  import * as React from 'react';
2
- import { MuiPickersAdapter, PickersTimezone } from '@mui/x-date-pickers/models';
2
+ import { MuiPickersAdapter, PickersTimezone, PickerValidDate } from '@mui/x-date-pickers/models';
3
3
  import { DateRangePosition } from './DateRangeCalendar.types';
4
4
  import { DateRange } from '../models';
5
- interface UseDragRangeParams<TDate> {
5
+ interface UseDragRangeParams<TDate extends PickerValidDate> {
6
6
  disableDragEditing?: boolean;
7
7
  utils: MuiPickersAdapter<TDate>;
8
8
  setRangeDragDay: (value: TDate | null) => void;
@@ -24,10 +24,10 @@ interface UseDragRangeEvents {
24
24
  onTouchMove?: React.TouchEventHandler<HTMLButtonElement>;
25
25
  onTouchEnd?: React.TouchEventHandler<HTMLButtonElement>;
26
26
  }
27
- interface UseDragRangeResponse<TDate> extends UseDragRangeEvents {
27
+ interface UseDragRangeResponse<TDate extends PickerValidDate> extends UseDragRangeEvents {
28
28
  isDragging: boolean;
29
29
  rangeDragDay: TDate | null;
30
30
  draggingDatePosition: DateRangePosition | null;
31
31
  }
32
- export declare const useDragRange: <TDate>({ disableDragEditing, utils, onDatePositionChange, onDrop, dateRange, timezone, }: Omit<UseDragRangeParams<TDate>, "isDragging" | "setRangeDragDay" | "setIsDragging">) => UseDragRangeResponse<TDate>;
32
+ export declare const useDragRange: <TDate extends PickerValidDate>({ disableDragEditing, utils, onDatePositionChange, onDrop, dateRange, timezone, }: Omit<UseDragRangeParams<TDate>, "isDragging" | "setRangeDragDay" | "setIsDragging">) => UseDragRangeResponse<TDate>;
33
33
  export {};
@@ -1,6 +1,7 @@
1
1
  import * as React from 'react';
2
+ import { PickerValidDate } from '@mui/x-date-pickers/models';
2
3
  import { DateRangePickerProps } from './DateRangePicker.types';
3
- type DatePickerComponent = (<TDate>(props: DateRangePickerProps<TDate> & React.RefAttributes<HTMLDivElement>) => React.JSX.Element) & {
4
+ type DatePickerComponent = (<TDate extends PickerValidDate>(props: DateRangePickerProps<TDate> & React.RefAttributes<HTMLDivElement>) => React.JSX.Element) & {
4
5
  propTypes?: any;
5
6
  };
6
7
  /**
@@ -87,7 +87,7 @@ process.env.NODE_ENV !== "production" ? DateRangePicker.propTypes = {
87
87
  * The default value.
88
88
  * Used when the component is not controlled.
89
89
  */
90
- defaultValue: PropTypes.arrayOf(PropTypes.any),
90
+ defaultValue: PropTypes.arrayOf(PropTypes.object),
91
91
  /**
92
92
  * CSS media query when `Mobile` mode will be changed to `Desktop`.
93
93
  * @default '@media (pointer: fine)'
@@ -174,11 +174,11 @@ process.env.NODE_ENV !== "production" ? DateRangePicker.propTypes = {
174
174
  /**
175
175
  * Maximal selectable date.
176
176
  */
177
- maxDate: PropTypes.any,
177
+ maxDate: PropTypes.object,
178
178
  /**
179
179
  * Minimal selectable date.
180
180
  */
181
- minDate: PropTypes.any,
181
+ minDate: PropTypes.object,
182
182
  /**
183
183
  * Name attribute used by the `input` element in the Field.
184
184
  * Ignored if the field has several inputs.
@@ -254,7 +254,7 @@ process.env.NODE_ENV !== "production" ? DateRangePicker.propTypes = {
254
254
  * The date used to generate the new value when both `value` and `defaultValue` are empty.
255
255
  * @default The closest valid date-time using the validation props, except callbacks like `shouldDisable<...>`.
256
256
  */
257
- referenceDate: PropTypes.any,
257
+ referenceDate: PropTypes.object,
258
258
  /**
259
259
  * Component rendered on the "day" view when `props.loading` is true.
260
260
  * @returns {React.ReactNode} The node to render when loading.
@@ -322,7 +322,7 @@ process.env.NODE_ENV !== "production" ? DateRangePicker.propTypes = {
322
322
  * The selected value.
323
323
  * Used when the component is controlled.
324
324
  */
325
- value: PropTypes.arrayOf(PropTypes.any),
325
+ value: PropTypes.arrayOf(PropTypes.object),
326
326
  /**
327
327
  * Define custom view renderers for each section.
328
328
  * If `null`, the section will only have field editing.
@@ -1,10 +1,11 @@
1
+ import { PickerValidDate } from '@mui/x-date-pickers/models';
1
2
  import { DesktopDateRangePickerProps, DesktopDateRangePickerSlots, DesktopDateRangePickerSlotProps } from '../DesktopDateRangePicker';
2
3
  import { MobileDateRangePickerProps, MobileDateRangePickerSlots, MobileDateRangePickerSlotProps } from '../MobileDateRangePicker';
3
- export interface DateRangePickerSlots<TDate> extends DesktopDateRangePickerSlots<TDate>, MobileDateRangePickerSlots<TDate> {
4
+ export interface DateRangePickerSlots<TDate extends PickerValidDate> extends DesktopDateRangePickerSlots<TDate>, MobileDateRangePickerSlots<TDate> {
4
5
  }
5
- export interface DateRangePickerSlotProps<TDate> extends DesktopDateRangePickerSlotProps<TDate>, MobileDateRangePickerSlotProps<TDate> {
6
+ export interface DateRangePickerSlotProps<TDate extends PickerValidDate> extends DesktopDateRangePickerSlotProps<TDate>, MobileDateRangePickerSlotProps<TDate> {
6
7
  }
7
- export interface DateRangePickerProps<TDate> extends DesktopDateRangePickerProps<TDate>, MobileDateRangePickerProps<TDate> {
8
+ export interface DateRangePickerProps<TDate extends PickerValidDate> extends DesktopDateRangePickerProps<TDate>, MobileDateRangePickerProps<TDate> {
8
9
  /**
9
10
  * CSS media query when `Mobile` mode will be changed to `Desktop`.
10
11
  * @default '@media (pointer: fine)'
@@ -1,9 +1,10 @@
1
1
  import * as React from 'react';
2
2
  import { BaseToolbarProps, ExportedBaseToolbarProps } from '@mui/x-date-pickers/internals';
3
+ import { PickerValidDate } from '@mui/x-date-pickers/models';
3
4
  import { DateRange } from '../models';
4
5
  import { UseRangePositionResponse } from '../internals/hooks/useRangePosition';
5
6
  import { DateRangePickerToolbarClasses } from './dateRangePickerToolbarClasses';
6
- export interface DateRangePickerToolbarProps<TDate> extends Omit<BaseToolbarProps<DateRange<TDate>, 'day'>, 'views' | 'view' | 'onViewChange' | 'onChange' | 'isLandscape'>, Pick<UseRangePositionResponse, 'rangePosition' | 'onRangePositionChange'> {
7
+ export interface DateRangePickerToolbarProps<TDate extends PickerValidDate> extends Omit<BaseToolbarProps<DateRange<TDate>, 'day'>, 'views' | 'view' | 'onViewChange' | 'onChange' | 'isLandscape'>, Pick<UseRangePositionResponse, 'rangePosition' | 'onRangePositionChange'> {
7
8
  classes?: Partial<DateRangePickerToolbarClasses>;
8
9
  }
9
10
  export interface ExportedDateRangePickerToolbarProps extends ExportedBaseToolbarProps {
@@ -18,5 +19,5 @@ export interface ExportedDateRangePickerToolbarProps extends ExportedBaseToolbar
18
19
  *
19
20
  * - [DateRangePickerToolbar API](https://mui.com/x/api/date-pickers/date-range-picker-toolbar/)
20
21
  */
21
- declare const DateRangePickerToolbar: React.ForwardRefExoticComponent<DateRangePickerToolbarProps<unknown> & React.RefAttributes<HTMLDivElement>>;
22
+ declare const DateRangePickerToolbar: React.ForwardRefExoticComponent<DateRangePickerToolbarProps<PickerValidDate> & React.RefAttributes<HTMLDivElement>>;
22
23
  export { DateRangePickerToolbar };
@@ -115,6 +115,6 @@ process.env.NODE_ENV !== "production" ? DateRangePickerToolbar.propTypes = {
115
115
  * @default "––"
116
116
  */
117
117
  toolbarPlaceholder: PropTypes.node,
118
- value: PropTypes.arrayOf(PropTypes.any).isRequired
118
+ value: PropTypes.arrayOf(PropTypes.object).isRequired
119
119
  } : void 0;
120
120
  export { DateRangePickerToolbar };
@@ -1,21 +1,22 @@
1
1
  import * as React from 'react';
2
2
  import { LocalizedComponent } from '@mui/x-date-pickers/locales';
3
3
  import { DefaultizedProps, BaseDateValidationProps, BasePickerInputProps, PickerViewRendererLookup } from '@mui/x-date-pickers/internals';
4
+ import { PickerValidDate } from '@mui/x-date-pickers/models';
4
5
  import { DateRangeValidationError, DateRange } from '../models';
5
6
  import { DateRangeCalendarSlots, DateRangeCalendarSlotProps, ExportedDateRangeCalendarProps } from '../DateRangeCalendar';
6
7
  import { DateRangePickerToolbarProps, ExportedDateRangePickerToolbarProps } from './DateRangePickerToolbar';
7
8
  import { DateRangeViewRendererProps } from '../dateRangeViewRenderers';
8
- export interface BaseDateRangePickerSlots<TDate> extends DateRangeCalendarSlots<TDate> {
9
+ export interface BaseDateRangePickerSlots<TDate extends PickerValidDate> extends DateRangeCalendarSlots<TDate> {
9
10
  /**
10
11
  * Custom component for the toolbar rendered above the views.
11
12
  * @default DateTimePickerToolbar
12
13
  */
13
14
  toolbar?: React.JSXElementConstructor<DateRangePickerToolbarProps<TDate>>;
14
15
  }
15
- export interface BaseDateRangePickerSlotProps<TDate> extends DateRangeCalendarSlotProps<TDate> {
16
+ export interface BaseDateRangePickerSlotProps<TDate extends PickerValidDate> extends DateRangeCalendarSlotProps<TDate> {
16
17
  toolbar?: ExportedDateRangePickerToolbarProps;
17
18
  }
18
- export interface BaseDateRangePickerProps<TDate> extends Omit<BasePickerInputProps<DateRange<TDate>, TDate, 'day', DateRangeValidationError>, 'view' | 'views' | 'openTo' | 'onViewChange' | 'orientation'>, ExportedDateRangeCalendarProps<TDate>, BaseDateValidationProps<TDate> {
19
+ export interface BaseDateRangePickerProps<TDate extends PickerValidDate> extends Omit<BasePickerInputProps<DateRange<TDate>, TDate, 'day', DateRangeValidationError>, 'view' | 'views' | 'openTo' | 'onViewChange' | 'orientation'>, ExportedDateRangeCalendarProps<TDate>, BaseDateValidationProps<TDate> {
19
20
  /**
20
21
  * Overridable component slots.
21
22
  * @default {}
@@ -33,6 +34,6 @@ export interface BaseDateRangePickerProps<TDate> extends Omit<BasePickerInputPro
33
34
  */
34
35
  viewRenderers?: Partial<PickerViewRendererLookup<DateRange<TDate>, 'day', DateRangeViewRendererProps<TDate, 'day'>, {}>>;
35
36
  }
36
- type UseDateRangePickerDefaultizedProps<TDate, Props extends BaseDateRangePickerProps<TDate>> = LocalizedComponent<TDate, DefaultizedProps<Props, keyof BaseDateValidationProps<TDate>>>;
37
- export declare function useDateRangePickerDefaultizedProps<TDate, Props extends BaseDateRangePickerProps<TDate>>(props: Props, name: string): UseDateRangePickerDefaultizedProps<TDate, Props>;
37
+ type UseDateRangePickerDefaultizedProps<TDate extends PickerValidDate, Props extends BaseDateRangePickerProps<TDate>> = LocalizedComponent<TDate, DefaultizedProps<Props, keyof BaseDateValidationProps<TDate>>>;
38
+ export declare function useDateRangePickerDefaultizedProps<TDate extends PickerValidDate, Props extends BaseDateRangePickerProps<TDate>>(props: Props, name: string): UseDateRangePickerDefaultizedProps<TDate, Props>;
38
39
  export {};
@@ -1,7 +1,8 @@
1
1
  import * as React from 'react';
2
+ import { PickerValidDate } from '@mui/x-date-pickers/models';
2
3
  import { PickersDayProps } from '@mui/x-date-pickers/PickersDay';
3
4
  import { DateRangePickerDayClasses } from './dateRangePickerDayClasses';
4
- export interface DateRangePickerDayProps<TDate> extends Omit<PickersDayProps<TDate>, 'classes' | 'onBlur' | 'onFocus' | 'onKeyDown'> {
5
+ export interface DateRangePickerDayProps<TDate extends PickerValidDate> extends Omit<PickersDayProps<TDate>, 'classes' | 'onBlur' | 'onFocus' | 'onKeyDown'> {
5
6
  /**
6
7
  * Set to `true` if the `day` is in a highlighted date range.
7
8
  */
@@ -35,7 +36,7 @@ export interface DateRangePickerDayProps<TDate> extends Omit<PickersDayProps<TDa
35
36
  */
36
37
  isVisuallySelected?: boolean;
37
38
  }
38
- type DateRangePickerDayComponent = <TDate>(props: DateRangePickerDayProps<TDate> & React.RefAttributes<HTMLButtonElement>) => React.JSX.Element;
39
+ type DateRangePickerDayComponent = <TDate extends PickerValidDate>(props: DateRangePickerDayProps<TDate> & React.RefAttributes<HTMLButtonElement>) => React.JSX.Element;
39
40
  /**
40
41
  * Demos:
41
42
  *
@@ -4,7 +4,7 @@ const _excluded = ["className", "day", "outsideCurrentMonth", "isEndOfHighlighti
4
4
  import * as React from 'react';
5
5
  import PropTypes from 'prop-types';
6
6
  import clsx from 'clsx';
7
- import { useLicenseVerifier } from '@mui/x-license-pro';
7
+ import { useLicenseVerifier } from '@mui/x-license';
8
8
  import { alpha, styled, useThemeProps } from '@mui/material/styles';
9
9
  import { unstable_composeClasses as composeClasses } from '@mui/utils';
10
10
  import { useUtils } from '@mui/x-date-pickers/internals';
@@ -237,7 +237,7 @@ process.env.NODE_ENV !== "production" ? DateRangePickerDayRaw.propTypes = {
237
237
  /**
238
238
  * The date to show.
239
239
  */
240
- day: PropTypes.any.isRequired,
240
+ day: PropTypes.object.isRequired,
241
241
  /**
242
242
  * If `true`, renders as disabled.
243
243
  * @default false
@@ -1,6 +1,7 @@
1
1
  import * as React from 'react';
2
+ import { PickerValidDate } from '@mui/x-date-pickers/models';
2
3
  import { DateTimeRangePickerProps } from './DateTimeRangePicker.types';
3
- type DateTimeRangePickerComponent = (<TDate>(props: DateTimeRangePickerProps<TDate> & React.RefAttributes<HTMLDivElement>) => React.JSX.Element) & {
4
+ type DateTimeRangePickerComponent = (<TDate extends PickerValidDate>(props: DateTimeRangePickerProps<TDate> & React.RefAttributes<HTMLDivElement>) => React.JSX.Element) & {
4
5
  propTypes?: any;
5
6
  };
6
7
  declare const DateTimeRangePicker: DateTimeRangePickerComponent;
@@ -81,7 +81,7 @@ process.env.NODE_ENV !== "production" ? DateTimeRangePicker.propTypes = {
81
81
  * The default value.
82
82
  * Used when the component is not controlled.
83
83
  */
84
- defaultValue: PropTypes.arrayOf(PropTypes.any),
84
+ defaultValue: PropTypes.arrayOf(PropTypes.object),
85
85
  /**
86
86
  * CSS media query when `Mobile` mode will be changed to `Desktop`.
87
87
  * @default '@media (pointer: fine)'
@@ -175,29 +175,29 @@ process.env.NODE_ENV !== "production" ? DateTimeRangePicker.propTypes = {
175
175
  /**
176
176
  * Maximal selectable date.
177
177
  */
178
- maxDate: PropTypes.any,
178
+ maxDate: PropTypes.object,
179
179
  /**
180
180
  * Maximal selectable moment of time with binding to date, to set max time in each day use `maxTime`.
181
181
  */
182
- maxDateTime: PropTypes.any,
182
+ maxDateTime: PropTypes.object,
183
183
  /**
184
184
  * Maximal selectable time.
185
185
  * The date part of the object will be ignored unless `props.disableIgnoringDatePartForTimeValidation === true`.
186
186
  */
187
- maxTime: PropTypes.any,
187
+ maxTime: PropTypes.object,
188
188
  /**
189
189
  * Minimal selectable date.
190
190
  */
191
- minDate: PropTypes.any,
191
+ minDate: PropTypes.object,
192
192
  /**
193
193
  * Minimal selectable moment of time with binding to date, to set min time in each day use `minTime`.
194
194
  */
195
- minDateTime: PropTypes.any,
195
+ minDateTime: PropTypes.object,
196
196
  /**
197
197
  * Minimal selectable time.
198
198
  * The date part of the object will be ignored unless `props.disableIgnoringDatePartForTimeValidation === true`.
199
199
  */
200
- minTime: PropTypes.any,
200
+ minTime: PropTypes.object,
201
201
  /**
202
202
  * Step over minutes.
203
203
  * @default 1
@@ -290,7 +290,7 @@ process.env.NODE_ENV !== "production" ? DateTimeRangePicker.propTypes = {
290
290
  * The date used to generate the new value when both `value` and `defaultValue` are empty.
291
291
  * @default The closest valid date-time using the validation props, except callbacks like `shouldDisable<...>`.
292
292
  */
293
- referenceDate: PropTypes.any,
293
+ referenceDate: PropTypes.object,
294
294
  /**
295
295
  * Component rendered on the "day" view when `props.loading` is true.
296
296
  * @returns {React.ReactNode} The node to render when loading.
@@ -387,7 +387,7 @@ process.env.NODE_ENV !== "production" ? DateTimeRangePicker.propTypes = {
387
387
  * The selected value.
388
388
  * Used when the component is controlled.
389
389
  */
390
- value: PropTypes.arrayOf(PropTypes.any),
390
+ value: PropTypes.arrayOf(PropTypes.object),
391
391
  /**
392
392
  * The visible view.
393
393
  * Used when the component view is controlled.
@@ -1,10 +1,11 @@
1
+ import { PickerValidDate } from '@mui/x-date-pickers/models';
1
2
  import { DesktopDateTimeRangePickerProps, DesktopDateTimeRangePickerSlots, DesktopDateTimeRangePickerSlotProps } from '../DesktopDateTimeRangePicker';
2
3
  import { MobileDateTimeRangePickerProps, MobileDateTimeRangePickerSlots, MobileDateTimeRangePickerSlotProps } from '../MobileDateTimeRangePicker';
3
- export interface DateTimeRangePickerSlots<TDate> extends DesktopDateTimeRangePickerSlots<TDate>, MobileDateTimeRangePickerSlots<TDate> {
4
+ export interface DateTimeRangePickerSlots<TDate extends PickerValidDate> extends DesktopDateTimeRangePickerSlots<TDate>, MobileDateTimeRangePickerSlots<TDate> {
4
5
  }
5
- export interface DateTimeRangePickerSlotProps<TDate> extends DesktopDateTimeRangePickerSlotProps<TDate>, MobileDateTimeRangePickerSlotProps<TDate> {
6
+ export interface DateTimeRangePickerSlotProps<TDate extends PickerValidDate> extends DesktopDateTimeRangePickerSlotProps<TDate>, MobileDateTimeRangePickerSlotProps<TDate> {
6
7
  }
7
- export interface DateTimeRangePickerProps<TDate> extends DesktopDateTimeRangePickerProps<TDate>, MobileDateTimeRangePickerProps<TDate> {
8
+ export interface DateTimeRangePickerProps<TDate extends PickerValidDate> extends DesktopDateTimeRangePickerProps<TDate>, MobileDateTimeRangePickerProps<TDate> {
8
9
  /**
9
10
  * CSS media query when `Mobile` mode will be changed to `Desktop`.
10
11
  * @default '@media (pointer: fine)'
@@ -1,9 +1,10 @@
1
1
  import * as React from 'react';
2
2
  import { PickerSelectionState, PickerViewRenderer, TimeViewWithMeridiem, BaseClockProps } from '@mui/x-date-pickers/internals';
3
+ import { PickerValidDate } from '@mui/x-date-pickers/models';
3
4
  import { DateTimeRangePickerView } from '../internals/models';
4
5
  import { DateRange } from '../models';
5
6
  import { UseRangePositionResponse } from '../internals/hooks/useRangePosition';
6
- export type DateTimeRangePickerTimeWrapperProps<TDate, TView extends DateTimeRangePickerView, TComponentProps extends Omit<BaseClockProps<TDate, TimeViewWithMeridiem>, 'value' | 'defaultValue' | 'onChange'>> = Pick<UseRangePositionResponse, 'rangePosition' | 'onRangePositionChange'> & Omit<TComponentProps, 'views' | 'view' | 'onViewChange' | 'value' | 'defaultValue' | 'onChange'> & {
7
+ export type DateTimeRangePickerTimeWrapperProps<TDate extends PickerValidDate, TView extends DateTimeRangePickerView, TComponentProps extends Omit<BaseClockProps<TDate, TimeViewWithMeridiem>, 'value' | 'defaultValue' | 'onChange'>> = Pick<UseRangePositionResponse, 'rangePosition' | 'onRangePositionChange'> & Omit<TComponentProps, 'views' | 'view' | 'onViewChange' | 'value' | 'defaultValue' | 'onChange'> & {
7
8
  view: TView;
8
9
  onViewChange?: (view: TView) => void;
9
10
  views: readonly TView[];
@@ -16,5 +17,5 @@ export type DateTimeRangePickerTimeWrapperProps<TDate, TView extends DateTimeRan
16
17
  /**
17
18
  * @ignore - internal component.
18
19
  */
19
- declare function DateTimeRangePickerTimeWrapper<TDate, TView extends DateTimeRangePickerView, TComponentProps extends Omit<BaseClockProps<TDate, TimeViewWithMeridiem>, 'value' | 'defaultValue' | 'onChange'>>(props: DateTimeRangePickerTimeWrapperProps<TDate, TView, TComponentProps>, ref: React.Ref<HTMLDivElement>): React.ReactNode;
20
+ declare function DateTimeRangePickerTimeWrapper<TDate extends PickerValidDate, TView extends DateTimeRangePickerView, TComponentProps extends Omit<BaseClockProps<TDate, TimeViewWithMeridiem>, 'value' | 'defaultValue' | 'onChange'>>(props: DateTimeRangePickerTimeWrapperProps<TDate, TView, TComponentProps>, ref: React.Ref<HTMLDivElement>): React.ReactNode;
20
21
  export { DateTimeRangePickerTimeWrapper };
@@ -1,15 +1,16 @@
1
1
  import * as React from 'react';
2
2
  import { BaseToolbarProps, ExportedBaseToolbarProps, DateOrTimeViewWithMeridiem, WrapperVariant } from '@mui/x-date-pickers/internals';
3
+ import { PickerValidDate } from '@mui/x-date-pickers/models';
3
4
  import { DateRange } from '../models';
4
5
  import { UseRangePositionResponse } from '../internals/hooks/useRangePosition';
5
6
  import { DateTimeRangePickerToolbarClasses } from './dateTimeRangePickerToolbarClasses';
6
7
  type DateTimeRangeViews = Exclude<DateOrTimeViewWithMeridiem, 'year' | 'month'>;
7
- export interface DateTimeRangePickerToolbarProps<TDate> extends BaseToolbarProps<DateRange<TDate>, DateTimeRangeViews>, Pick<UseRangePositionResponse, 'rangePosition' | 'onRangePositionChange'>, ExportedDateTimeRangePickerToolbarProps {
8
+ export interface DateTimeRangePickerToolbarProps<TDate extends PickerValidDate> extends BaseToolbarProps<DateRange<TDate>, DateTimeRangeViews>, Pick<UseRangePositionResponse, 'rangePosition' | 'onRangePositionChange'>, ExportedDateTimeRangePickerToolbarProps {
8
9
  ampm?: boolean;
9
10
  toolbarVariant?: WrapperVariant;
10
11
  }
11
12
  export interface ExportedDateTimeRangePickerToolbarProps extends ExportedBaseToolbarProps {
12
13
  classes?: Partial<DateTimeRangePickerToolbarClasses>;
13
14
  }
14
- declare const DateTimeRangePickerToolbar: React.ForwardRefExoticComponent<DateTimeRangePickerToolbarProps<unknown> & React.RefAttributes<HTMLDivElement>>;
15
+ declare const DateTimeRangePickerToolbar: React.ForwardRefExoticComponent<DateTimeRangePickerToolbarProps<PickerValidDate> & React.RefAttributes<HTMLDivElement>>;
15
16
  export { DateTimeRangePickerToolbar };
@@ -166,7 +166,7 @@ process.env.NODE_ENV !== "production" ? DateTimeRangePickerToolbar.propTypes = {
166
166
  */
167
167
  toolbarPlaceholder: PropTypes.node,
168
168
  toolbarVariant: PropTypes.oneOf(['desktop', 'mobile']),
169
- value: PropTypes.arrayOf(PropTypes.any).isRequired,
169
+ value: PropTypes.arrayOf(PropTypes.object).isRequired,
170
170
  /**
171
171
  * Currently visible picker view.
172
172
  */