@mui/x-date-pickers-pro 7.14.0 → 7.16.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (169) hide show
  1. package/CHANGELOG.md +167 -1
  2. package/DateRangeCalendar/DateRangeCalendar.js +11 -11
  3. package/DateRangeCalendar/index.js +2 -2
  4. package/DateRangeCalendar/useDragRange.js +1 -1
  5. package/DateRangePicker/DateRangePicker.js +13 -13
  6. package/DateRangePicker/DateRangePickerToolbar.js +1 -1
  7. package/DateRangePicker/index.js +3 -3
  8. package/DateRangePicker/shared.js +1 -1
  9. package/DateRangePickerDay/DateRangePickerDay.js +2 -2
  10. package/DateRangePickerDay/index.js +2 -2
  11. package/DateTimeRangePicker/DateTimeRangePicker.js +13 -13
  12. package/DateTimeRangePicker/DateTimeRangePickerTabs.js +1 -1
  13. package/DateTimeRangePicker/DateTimeRangePickerTimeWrapper.js +2 -2
  14. package/DateTimeRangePicker/DateTimeRangePickerToolbar.js +2 -2
  15. package/DateTimeRangePicker/index.js +5 -5
  16. package/DateTimeRangePicker/shared.js +2 -2
  17. package/DesktopDateRangePicker/DesktopDateRangePicker.js +17 -17
  18. package/DesktopDateRangePicker/index.js +1 -1
  19. package/DesktopDateTimeRangePicker/DesktopDateTimeRangePicker.js +20 -20
  20. package/DesktopDateTimeRangePicker/index.js +1 -1
  21. package/MobileDateRangePicker/MobileDateRangePicker.js +17 -17
  22. package/MobileDateRangePicker/index.js +1 -1
  23. package/MobileDateTimeRangePicker/MobileDateTimeRangePicker.js +20 -20
  24. package/MobileDateTimeRangePicker/index.js +1 -1
  25. package/MultiInputDateRangeField/MultiInputDateRangeField.js +11 -9
  26. package/MultiInputDateRangeField/index.js +2 -2
  27. package/MultiInputDateTimeRangeField/MultiInputDateTimeRangeField.js +11 -9
  28. package/MultiInputDateTimeRangeField/index.js +2 -2
  29. package/MultiInputTimeRangeField/MultiInputTimeRangeField.js +11 -9
  30. package/MultiInputTimeRangeField/index.js +2 -2
  31. package/PickersRangeCalendarHeader/index.js +1 -1
  32. package/SingleInputDateRangeField/SingleInputDateRangeField.js +10 -8
  33. package/SingleInputDateRangeField/index.js +2 -2
  34. package/SingleInputDateRangeField/useSingleInputDateRangeField.js +2 -2
  35. package/SingleInputDateTimeRangeField/SingleInputDateTimeRangeField.js +10 -8
  36. package/SingleInputDateTimeRangeField/index.js +2 -2
  37. package/SingleInputDateTimeRangeField/useSingleInputDateTimeRangeField.js +2 -2
  38. package/SingleInputTimeRangeField/SingleInputTimeRangeField.js +10 -8
  39. package/SingleInputTimeRangeField/index.js +2 -2
  40. package/SingleInputTimeRangeField/useSingleInputTimeRangeField.js +2 -2
  41. package/StaticDateRangePicker/StaticDateRangePicker.js +16 -16
  42. package/StaticDateRangePicker/index.js +1 -1
  43. package/dateRangeViewRenderers/dateRangeViewRenderers.js +1 -1
  44. package/dateRangeViewRenderers/index.js +1 -1
  45. package/index.js +19 -19
  46. package/internals/hooks/useDesktopRangePicker/index.js +1 -1
  47. package/internals/hooks/useDesktopRangePicker/useDesktopRangePicker.js +3 -3
  48. package/internals/hooks/useMobileRangePicker/index.js +1 -1
  49. package/internals/hooks/useMobileRangePicker/useMobileRangePicker.js +3 -3
  50. package/internals/hooks/useMultiInputRangeField/useMultiInputDateRangeField.js +4 -4
  51. package/internals/hooks/useMultiInputRangeField/useMultiInputDateTimeRangeField.js +4 -4
  52. package/internals/hooks/useMultiInputRangeField/useMultiInputTimeRangeField.js +4 -4
  53. package/internals/hooks/useStaticRangePicker/index.js +1 -1
  54. package/internals/hooks/useStaticRangePicker/useStaticRangePicker.js +1 -1
  55. package/internals/models/index.js +4 -4
  56. package/internals/utils/releaseInfo.js +1 -1
  57. package/internals/utils/validation/validateDateRange.js +1 -1
  58. package/internals/utils/validation/validateDateTimeRange.js +1 -1
  59. package/internals/utils/validation/validateTimeRange.js +1 -1
  60. package/internals/utils/valueManagers.js +1 -1
  61. package/models/index.js +5 -5
  62. package/modern/DateRangeCalendar/DateRangeCalendar.js +11 -11
  63. package/modern/DateRangeCalendar/index.js +2 -2
  64. package/modern/DateRangeCalendar/useDragRange.js +1 -1
  65. package/modern/DateRangePicker/DateRangePicker.js +13 -13
  66. package/modern/DateRangePicker/DateRangePickerToolbar.js +1 -1
  67. package/modern/DateRangePicker/index.js +3 -3
  68. package/modern/DateRangePicker/shared.js +1 -1
  69. package/modern/DateRangePickerDay/DateRangePickerDay.js +2 -2
  70. package/modern/DateRangePickerDay/index.js +2 -2
  71. package/modern/DateTimeRangePicker/DateTimeRangePicker.js +13 -13
  72. package/modern/DateTimeRangePicker/DateTimeRangePickerTabs.js +1 -1
  73. package/modern/DateTimeRangePicker/DateTimeRangePickerTimeWrapper.js +2 -2
  74. package/modern/DateTimeRangePicker/DateTimeRangePickerToolbar.js +2 -2
  75. package/modern/DateTimeRangePicker/index.js +5 -5
  76. package/modern/DateTimeRangePicker/shared.js +2 -2
  77. package/modern/DesktopDateRangePicker/DesktopDateRangePicker.js +17 -17
  78. package/modern/DesktopDateRangePicker/index.js +1 -1
  79. package/modern/DesktopDateTimeRangePicker/DesktopDateTimeRangePicker.js +20 -20
  80. package/modern/DesktopDateTimeRangePicker/index.js +1 -1
  81. package/modern/MobileDateRangePicker/MobileDateRangePicker.js +17 -17
  82. package/modern/MobileDateRangePicker/index.js +1 -1
  83. package/modern/MobileDateTimeRangePicker/MobileDateTimeRangePicker.js +20 -20
  84. package/modern/MobileDateTimeRangePicker/index.js +1 -1
  85. package/modern/MultiInputDateRangeField/MultiInputDateRangeField.js +11 -9
  86. package/modern/MultiInputDateRangeField/index.js +2 -2
  87. package/modern/MultiInputDateTimeRangeField/MultiInputDateTimeRangeField.js +11 -9
  88. package/modern/MultiInputDateTimeRangeField/index.js +2 -2
  89. package/modern/MultiInputTimeRangeField/MultiInputTimeRangeField.js +11 -9
  90. package/modern/MultiInputTimeRangeField/index.js +2 -2
  91. package/modern/PickersRangeCalendarHeader/index.js +1 -1
  92. package/modern/SingleInputDateRangeField/SingleInputDateRangeField.js +10 -8
  93. package/modern/SingleInputDateRangeField/index.js +2 -2
  94. package/modern/SingleInputDateRangeField/useSingleInputDateRangeField.js +2 -2
  95. package/modern/SingleInputDateTimeRangeField/SingleInputDateTimeRangeField.js +10 -8
  96. package/modern/SingleInputDateTimeRangeField/index.js +2 -2
  97. package/modern/SingleInputDateTimeRangeField/useSingleInputDateTimeRangeField.js +2 -2
  98. package/modern/SingleInputTimeRangeField/SingleInputTimeRangeField.js +10 -8
  99. package/modern/SingleInputTimeRangeField/index.js +2 -2
  100. package/modern/SingleInputTimeRangeField/useSingleInputTimeRangeField.js +2 -2
  101. package/modern/StaticDateRangePicker/StaticDateRangePicker.js +16 -16
  102. package/modern/StaticDateRangePicker/index.js +1 -1
  103. package/modern/dateRangeViewRenderers/dateRangeViewRenderers.js +1 -1
  104. package/modern/dateRangeViewRenderers/index.js +1 -1
  105. package/modern/index.js +19 -19
  106. package/modern/internals/hooks/useDesktopRangePicker/index.js +1 -1
  107. package/modern/internals/hooks/useDesktopRangePicker/useDesktopRangePicker.js +3 -3
  108. package/modern/internals/hooks/useMobileRangePicker/index.js +1 -1
  109. package/modern/internals/hooks/useMobileRangePicker/useMobileRangePicker.js +3 -3
  110. package/modern/internals/hooks/useMultiInputRangeField/useMultiInputDateRangeField.js +4 -4
  111. package/modern/internals/hooks/useMultiInputRangeField/useMultiInputDateTimeRangeField.js +4 -4
  112. package/modern/internals/hooks/useMultiInputRangeField/useMultiInputTimeRangeField.js +4 -4
  113. package/modern/internals/hooks/useStaticRangePicker/index.js +1 -1
  114. package/modern/internals/hooks/useStaticRangePicker/useStaticRangePicker.js +1 -1
  115. package/modern/internals/models/index.js +4 -4
  116. package/modern/internals/utils/releaseInfo.js +1 -1
  117. package/modern/internals/utils/validation/validateDateRange.js +1 -1
  118. package/modern/internals/utils/validation/validateDateTimeRange.js +1 -1
  119. package/modern/internals/utils/validation/validateTimeRange.js +1 -1
  120. package/modern/internals/utils/valueManagers.js +1 -1
  121. package/modern/models/index.js +5 -5
  122. package/modern/themeAugmentation/index.js +1 -4
  123. package/node/DateRangeCalendar/DateRangeCalendar.js +3 -4
  124. package/node/DateRangeCalendar/useDragRange.js +2 -3
  125. package/node/DateRangePicker/DateRangePicker.js +13 -14
  126. package/node/DateRangePicker/DateRangePickerToolbar.js +2 -3
  127. package/node/DateRangePicker/shared.js +2 -3
  128. package/node/DateRangePickerDay/DateRangePickerDay.js +2 -3
  129. package/node/DateTimeRangePicker/DateTimeRangePicker.js +13 -14
  130. package/node/DateTimeRangePicker/DateTimeRangePickerTabs.js +2 -3
  131. package/node/DateTimeRangePicker/DateTimeRangePickerTimeWrapper.js +1 -1
  132. package/node/DateTimeRangePicker/DateTimeRangePickerToolbar.js +2 -3
  133. package/node/DateTimeRangePicker/dateTimeRangePickerTabsClasses.js +1 -1
  134. package/node/DateTimeRangePicker/shared.js +1 -1
  135. package/node/DesktopDateRangePicker/DesktopDateRangePicker.js +13 -14
  136. package/node/DesktopDateTimeRangePicker/DesktopDateTimeRangePicker.js +14 -15
  137. package/node/MobileDateRangePicker/MobileDateRangePicker.js +13 -14
  138. package/node/MobileDateTimeRangePicker/MobileDateTimeRangePicker.js +14 -15
  139. package/node/MultiInputDateRangeField/MultiInputDateRangeField.js +12 -11
  140. package/node/MultiInputDateTimeRangeField/MultiInputDateTimeRangeField.js +12 -11
  141. package/node/MultiInputTimeRangeField/MultiInputTimeRangeField.js +12 -11
  142. package/node/PickersRangeCalendarHeader/PickersRangeCalendarHeader.js +2 -3
  143. package/node/SingleInputDateRangeField/SingleInputDateRangeField.js +11 -10
  144. package/node/SingleInputDateRangeField/useSingleInputDateRangeField.js +1 -2
  145. package/node/SingleInputDateTimeRangeField/SingleInputDateTimeRangeField.js +11 -10
  146. package/node/SingleInputDateTimeRangeField/useSingleInputDateTimeRangeField.js +1 -2
  147. package/node/SingleInputTimeRangeField/SingleInputTimeRangeField.js +11 -10
  148. package/node/SingleInputTimeRangeField/useSingleInputTimeRangeField.js +1 -2
  149. package/node/StaticDateRangePicker/StaticDateRangePicker.js +13 -14
  150. package/node/dateRangeViewRenderers/dateRangeViewRenderers.js +1 -2
  151. package/node/index.js +1 -1
  152. package/node/internals/hooks/useDesktopRangePicker/useDesktopRangePicker.js +2 -3
  153. package/node/internals/hooks/useEnrichedRangePickerFieldProps.js +2 -3
  154. package/node/internals/hooks/useMobileRangePicker/useMobileRangePicker.js +2 -3
  155. package/node/internals/hooks/useMultiInputFieldSelectedSections.js +2 -3
  156. package/node/internals/hooks/useMultiInputRangeField/useMultiInputDateRangeField.js +1 -1
  157. package/node/internals/hooks/useMultiInputRangeField/useMultiInputDateTimeRangeField.js +1 -1
  158. package/node/internals/hooks/useMultiInputRangeField/useMultiInputTimeRangeField.js +1 -1
  159. package/node/internals/hooks/useRangePosition.js +1 -1
  160. package/node/internals/hooks/useStaticRangePicker/useStaticRangePicker.js +2 -3
  161. package/node/internals/utils/date-fields-utils.js +1 -1
  162. package/node/internals/utils/releaseInfo.js +1 -1
  163. package/node/internals/utils/validation/validateDateRange.js +1 -1
  164. package/node/internals/utils/validation/validateDateTimeRange.js +1 -1
  165. package/node/internals/utils/valueManagers.js +1 -1
  166. package/node/themeAugmentation/index.js +0 -33
  167. package/package.json +7 -6
  168. package/themeAugmentation/index.d.ts +3 -3
  169. package/themeAugmentation/index.js +1 -4
@@ -11,14 +11,14 @@ import { multiSectionDigitalClockClasses, multiSectionDigitalClockSectionClasses
11
11
  import Divider from '@mui/material/Divider';
12
12
  import { digitalClockClasses } from '@mui/x-date-pickers/DigitalClock';
13
13
  import { DesktopDateTimePickerLayout } from '@mui/x-date-pickers/DesktopDateTimePicker';
14
- import { rangeValueManager } from '../internals/utils/valueManagers';
15
- import { renderDateRangeViewCalendar } from '../dateRangeViewRenderers';
16
- import { useDesktopRangePicker } from '../internals/hooks/useDesktopRangePicker';
17
- import { validateDateTimeRange } from '../internals/utils/validation/validateDateTimeRange';
18
- import { useDateTimeRangePickerDefaultizedProps } from '../DateTimeRangePicker/shared';
19
- import { MultiInputDateTimeRangeField } from '../MultiInputDateTimeRangeField';
20
- import { DateTimeRangePickerTimeWrapper } from '../DateTimeRangePicker/DateTimeRangePickerTimeWrapper';
21
- import { RANGE_VIEW_HEIGHT } from '../internals/constants/dimensions';
14
+ import { rangeValueManager } from "../internals/utils/valueManagers.js";
15
+ import { renderDateRangeViewCalendar } from "../dateRangeViewRenderers/index.js";
16
+ import { useDesktopRangePicker } from "../internals/hooks/useDesktopRangePicker/index.js";
17
+ import { validateDateTimeRange } from "../internals/utils/validation/validateDateTimeRange.js";
18
+ import { useDateTimeRangePickerDefaultizedProps } from "../DateTimeRangePicker/shared.js";
19
+ import { MultiInputDateTimeRangeField } from "../MultiInputDateTimeRangeField/index.js";
20
+ import { DateTimeRangePickerTimeWrapper } from "../DateTimeRangePicker/DateTimeRangePickerTimeWrapper.js";
21
+ import { RANGE_VIEW_HEIGHT } from "../internals/constants/dimensions.js";
22
22
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
23
23
  const rendererInterceptor = function rendererInterceptor(inViewRenderers, popperView, rendererProps) {
24
24
  const {
@@ -93,7 +93,7 @@ const DesktopDateTimeRangePicker = /*#__PURE__*/React.forwardRef(function Deskto
93
93
  const props = _extends({}, defaultizedProps, {
94
94
  views,
95
95
  viewRenderers,
96
- format: resolveDateTimeFormat(utils, defaultizedProps),
96
+ format: resolveDateTimeFormat(utils, defaultizedProps, true),
97
97
  // force true to correctly handle `renderTimeViewClock` as a renderer
98
98
  ampmInClock: true,
99
99
  calendars: defaultizedProps.calendars ?? 1,
@@ -304,16 +304,16 @@ DesktopDateTimeRangePicker.propTypes = {
304
304
  name: PropTypes.string,
305
305
  /**
306
306
  * Callback fired when the value is accepted.
307
- * @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.
308
- * @template TError The validation error type. Will be either `string` or a `null`. Can be in `[start, end]` format in case of range value.
307
+ * @template TValue The value type. It will be the same type as `value` or `null`. It can be in `[start, end]` format in case of range value.
308
+ * @template TError The validation error type. It will be either `string` or a `null`. It can be in `[start, end]` format in case of range value.
309
309
  * @param {TValue} value The value that was just accepted.
310
310
  * @param {FieldChangeHandlerContext<TError>} context The context containing the validation result of the current value.
311
311
  */
312
312
  onAccept: PropTypes.func,
313
313
  /**
314
314
  * Callback fired when the value changes.
315
- * @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.
316
- * @template TError The validation error type. Will be either `string` or a `null`. Can be in `[start, end]` format in case of range value.
315
+ * @template TValue The value type. It will be the same type as `value` or `null`. It can be in `[start, end]` format in case of range value.
316
+ * @template TError The validation error type. It will be either `string` or a `null`. It can be in `[start, end]` format in case of range value.
317
317
  * @param {TValue} value The new value.
318
318
  * @param {FieldChangeHandlerContext<TError>} context The context containing the validation result of the current value.
319
319
  */
@@ -324,13 +324,13 @@ DesktopDateTimeRangePicker.propTypes = {
324
324
  */
325
325
  onClose: PropTypes.func,
326
326
  /**
327
- * Callback fired when the error associated to the current value changes.
328
- * If the error has a non-null value, then the `TextField` will be rendered in `error` state.
329
- *
330
- * @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.
331
- * @template TError The validation error type. Will be either `string` or a `null`. Can be in `[start, end]` format in case of range value.
332
- * @param {TError} error The new error describing why the current value is not valid.
333
- * @param {TValue} value The value associated to the error.
327
+ * Callback fired when the error associated with the current value changes.
328
+ * When a validation error is detected, the `error` parameter contains a non-null value.
329
+ * This can be used to render an appropriate form error.
330
+ * @template TError The validation error type. It will be either `string` or a `null`. It can be in `[start, end]` format in case of range value.
331
+ * @template TValue The value type. It will be the same type as `value` or `null`. It can be in `[start, end]` format in case of range value.
332
+ * @param {TError} error The reason why the current value is not valid.
333
+ * @param {TValue} value The value associated with the error.
334
334
  */
335
335
  onError: PropTypes.func,
336
336
  /**
@@ -1 +1 @@
1
- export { DesktopDateTimeRangePicker } from './DesktopDateTimeRangePicker';
1
+ export { DesktopDateTimeRangePicker } from "./DesktopDateTimeRangePicker.js";
@@ -4,12 +4,12 @@ import PropTypes from 'prop-types';
4
4
  import { extractValidationProps } from '@mui/x-date-pickers/internals';
5
5
  import resolveComponentProps from '@mui/utils/resolveComponentProps';
6
6
  import { refType } from '@mui/utils';
7
- import { rangeValueManager } from '../internals/utils/valueManagers';
8
- import { useDateRangePickerDefaultizedProps } from '../DateRangePicker/shared';
9
- import { renderDateRangeViewCalendar } from '../dateRangeViewRenderers';
10
- import { MultiInputDateRangeField } from '../MultiInputDateRangeField';
11
- import { useMobileRangePicker } from '../internals/hooks/useMobileRangePicker';
12
- import { validateDateRange } from '../internals/utils/validation/validateDateRange';
7
+ import { rangeValueManager } from "../internals/utils/valueManagers.js";
8
+ import { useDateRangePickerDefaultizedProps } from "../DateRangePicker/shared.js";
9
+ import { renderDateRangeViewCalendar } from "../dateRangeViewRenderers/index.js";
10
+ import { MultiInputDateRangeField } from "../MultiInputDateRangeField/index.js";
11
+ import { useMobileRangePicker } from "../internals/hooks/useMobileRangePicker/index.js";
12
+ import { validateDateRange } from "../internals/utils/validation/validateDateRange.js";
13
13
  /**
14
14
  * Demos:
15
15
  *
@@ -192,16 +192,16 @@ MobileDateRangePicker.propTypes = {
192
192
  name: PropTypes.string,
193
193
  /**
194
194
  * Callback fired when the value is accepted.
195
- * @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.
196
- * @template TError The validation error type. Will be either `string` or a `null`. Can be in `[start, end]` format in case of range value.
195
+ * @template TValue The value type. It will be the same type as `value` or `null`. It can be in `[start, end]` format in case of range value.
196
+ * @template TError The validation error type. It will be either `string` or a `null`. It can be in `[start, end]` format in case of range value.
197
197
  * @param {TValue} value The value that was just accepted.
198
198
  * @param {FieldChangeHandlerContext<TError>} context The context containing the validation result of the current value.
199
199
  */
200
200
  onAccept: PropTypes.func,
201
201
  /**
202
202
  * Callback fired when the value changes.
203
- * @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.
204
- * @template TError The validation error type. Will be either `string` or a `null`. Can be in `[start, end]` format in case of range value.
203
+ * @template TValue The value type. It will be the same type as `value` or `null`. It can be in `[start, end]` format in case of range value.
204
+ * @template TError The validation error type. It will be either `string` or a `null`. It can be in `[start, end]` format in case of range value.
205
205
  * @param {TValue} value The new value.
206
206
  * @param {FieldChangeHandlerContext<TError>} context The context containing the validation result of the current value.
207
207
  */
@@ -212,13 +212,13 @@ MobileDateRangePicker.propTypes = {
212
212
  */
213
213
  onClose: PropTypes.func,
214
214
  /**
215
- * Callback fired when the error associated to the current value changes.
216
- * If the error has a non-null value, then the `TextField` will be rendered in `error` state.
217
- *
218
- * @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.
219
- * @template TError The validation error type. Will be either `string` or a `null`. Can be in `[start, end]` format in case of range value.
220
- * @param {TError} error The new error describing why the current value is not valid.
221
- * @param {TValue} value The value associated to the error.
215
+ * Callback fired when the error associated with the current value changes.
216
+ * When a validation error is detected, the `error` parameter contains a non-null value.
217
+ * This can be used to render an appropriate form error.
218
+ * @template TError The validation error type. It will be either `string` or a `null`. It can be in `[start, end]` format in case of range value.
219
+ * @template TValue The value type. It will be the same type as `value` or `null`. It can be in `[start, end]` format in case of range value.
220
+ * @param {TError} error The reason why the current value is not valid.
221
+ * @param {TValue} value The value associated with the error.
222
222
  */
223
223
  onError: PropTypes.func,
224
224
  /**
@@ -1 +1 @@
1
- export { MobileDateRangePicker } from './MobileDateRangePicker';
1
+ export { MobileDateRangePicker } from "./MobileDateRangePicker.js";
@@ -9,14 +9,14 @@ import resolveComponentProps from '@mui/utils/resolveComponentProps';
9
9
  import { renderDigitalClockTimeView, renderMultiSectionDigitalClockTimeView } from '@mui/x-date-pickers/timeViewRenderers';
10
10
  import { multiSectionDigitalClockClasses, multiSectionDigitalClockSectionClasses } from '@mui/x-date-pickers/MultiSectionDigitalClock';
11
11
  import { digitalClockClasses } from '@mui/x-date-pickers/DigitalClock';
12
- import { rangeValueManager } from '../internals/utils/valueManagers';
13
- import { renderDateRangeViewCalendar } from '../dateRangeViewRenderers';
14
- import { useMobileRangePicker } from '../internals/hooks/useMobileRangePicker';
15
- import { validateDateTimeRange } from '../internals/utils/validation/validateDateTimeRange';
16
- import { useDateTimeRangePickerDefaultizedProps } from '../DateTimeRangePicker/shared';
17
- import { MultiInputDateTimeRangeField } from '../MultiInputDateTimeRangeField';
18
- import { DateTimeRangePickerTimeWrapper } from '../DateTimeRangePicker/DateTimeRangePickerTimeWrapper';
19
- import { RANGE_VIEW_HEIGHT } from '../internals/constants/dimensions';
12
+ import { rangeValueManager } from "../internals/utils/valueManagers.js";
13
+ import { renderDateRangeViewCalendar } from "../dateRangeViewRenderers/index.js";
14
+ import { useMobileRangePicker } from "../internals/hooks/useMobileRangePicker/index.js";
15
+ import { validateDateTimeRange } from "../internals/utils/validation/validateDateTimeRange.js";
16
+ import { useDateTimeRangePickerDefaultizedProps } from "../DateTimeRangePicker/shared.js";
17
+ import { MultiInputDateTimeRangeField } from "../MultiInputDateTimeRangeField/index.js";
18
+ import { DateTimeRangePickerTimeWrapper } from "../DateTimeRangePicker/DateTimeRangePickerTimeWrapper.js";
19
+ import { RANGE_VIEW_HEIGHT } from "../internals/constants/dimensions.js";
20
20
  import { jsx as _jsx } from "react/jsx-runtime";
21
21
  const rendererInterceptor = function rendererInterceptor(inViewRenderers, popperView, rendererProps) {
22
22
  const {
@@ -95,7 +95,7 @@ const MobileDateTimeRangePicker = /*#__PURE__*/React.forwardRef(function MobileD
95
95
  }, defaultizedProps.viewRenderers);
96
96
  const props = _extends({}, defaultizedProps, {
97
97
  viewRenderers,
98
- format: resolveDateTimeFormat(utils, defaultizedProps),
98
+ format: resolveDateTimeFormat(utils, defaultizedProps, true),
99
99
  // Force one calendar on mobile to avoid layout issues
100
100
  calendars: 1,
101
101
  // force true to correctly handle `renderTimeViewClock` as a renderer
@@ -298,16 +298,16 @@ MobileDateTimeRangePicker.propTypes = {
298
298
  name: PropTypes.string,
299
299
  /**
300
300
  * Callback fired when the value is accepted.
301
- * @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.
302
- * @template TError The validation error type. Will be either `string` or a `null`. Can be in `[start, end]` format in case of range value.
301
+ * @template TValue The value type. It will be the same type as `value` or `null`. It can be in `[start, end]` format in case of range value.
302
+ * @template TError The validation error type. It will be either `string` or a `null`. It can be in `[start, end]` format in case of range value.
303
303
  * @param {TValue} value The value that was just accepted.
304
304
  * @param {FieldChangeHandlerContext<TError>} context The context containing the validation result of the current value.
305
305
  */
306
306
  onAccept: PropTypes.func,
307
307
  /**
308
308
  * Callback fired when the value changes.
309
- * @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.
310
- * @template TError The validation error type. Will be either `string` or a `null`. Can be in `[start, end]` format in case of range value.
309
+ * @template TValue The value type. It will be the same type as `value` or `null`. It can be in `[start, end]` format in case of range value.
310
+ * @template TError The validation error type. It will be either `string` or a `null`. It can be in `[start, end]` format in case of range value.
311
311
  * @param {TValue} value The new value.
312
312
  * @param {FieldChangeHandlerContext<TError>} context The context containing the validation result of the current value.
313
313
  */
@@ -318,13 +318,13 @@ MobileDateTimeRangePicker.propTypes = {
318
318
  */
319
319
  onClose: PropTypes.func,
320
320
  /**
321
- * Callback fired when the error associated to the current value changes.
322
- * If the error has a non-null value, then the `TextField` will be rendered in `error` state.
323
- *
324
- * @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.
325
- * @template TError The validation error type. Will be either `string` or a `null`. Can be in `[start, end]` format in case of range value.
326
- * @param {TError} error The new error describing why the current value is not valid.
327
- * @param {TValue} value The value associated to the error.
321
+ * Callback fired when the error associated with the current value changes.
322
+ * When a validation error is detected, the `error` parameter contains a non-null value.
323
+ * This can be used to render an appropriate form error.
324
+ * @template TError The validation error type. It will be either `string` or a `null`. It can be in `[start, end]` format in case of range value.
325
+ * @template TValue The value type. It will be the same type as `value` or `null`. It can be in `[start, end]` format in case of range value.
326
+ * @param {TError} error The reason why the current value is not valid.
327
+ * @param {TValue} value The value associated with the error.
328
328
  */
329
329
  onError: PropTypes.func,
330
330
  /**
@@ -1 +1 @@
1
- export { MobileDateTimeRangePicker } from './MobileDateTimeRangePicker';
1
+ export { MobileDateTimeRangePicker } from "./MobileDateTimeRangePicker.js";
@@ -12,7 +12,7 @@ import useSlotProps from '@mui/utils/useSlotProps';
12
12
  import { unstable_composeClasses as composeClasses, unstable_generateUtilityClass as generateUtilityClass, unstable_generateUtilityClasses as generateUtilityClasses } from '@mui/utils';
13
13
  import { splitFieldInternalAndForwardedProps, convertFieldResponseIntoMuiTextFieldProps } from '@mui/x-date-pickers/internals';
14
14
  import { PickersTextField } from '@mui/x-date-pickers/PickersTextField';
15
- import { useMultiInputDateRangeField } from '../internals/hooks/useMultiInputRangeField/useMultiInputDateRangeField';
15
+ import { useMultiInputDateRangeField } from "../internals/hooks/useMultiInputRangeField/useMultiInputDateRangeField.js";
16
16
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
17
17
  export const multiInputDateRangeFieldClasses = generateUtilityClasses('MuiMultiInputDateRangeField', ['root', 'separator']);
18
18
  export const getMultiInputDateRangeFieldUtilityClass = slot => generateUtilityClass('MuiMultiInputDateRangeField', slot);
@@ -26,7 +26,7 @@ const useUtilityClasses = ownerState => {
26
26
  };
27
27
  return composeClasses(slots, getMultiInputDateRangeFieldUtilityClass, classes);
28
28
  };
29
- const MultiInputDateRangeFieldRoot = styled( /*#__PURE__*/React.forwardRef((props, ref) => /*#__PURE__*/_jsx(Stack, _extends({
29
+ const MultiInputDateRangeFieldRoot = styled(/*#__PURE__*/React.forwardRef((props, ref) => /*#__PURE__*/_jsx(Stack, _extends({
30
30
  ref: ref,
31
31
  spacing: 2,
32
32
  direction: "row",
@@ -200,18 +200,20 @@ process.env.NODE_ENV !== "production" ? MultiInputDateRangeField.propTypes = {
200
200
  minDate: PropTypes.object,
201
201
  /**
202
202
  * Callback fired when the value changes.
203
- * @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.
204
- * @template TError The validation error type. Will be either `string` or a `null`. Can be in `[start, end]` format in case of range value.
203
+ * @template TValue The value type. It will be the same type as `value` or `null`. It can be in `[start, end]` format in case of range value.
204
+ * @template TError The validation error type. It will be either `string` or a `null`. It can be in `[start, end]` format in case of range value.
205
205
  * @param {TValue} value The new value.
206
206
  * @param {FieldChangeHandlerContext<TError>} context The context containing the validation result of the current value.
207
207
  */
208
208
  onChange: PropTypes.func,
209
209
  /**
210
- * Callback fired when the error associated to the current value changes.
211
- * @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.
212
- * @template TError The validation error type. Will be either `string` or a `null`. Can be in `[start, end]` format in case of range value.
213
- * @param {TError} error The new error.
214
- * @param {TValue} value The value associated to the error.
210
+ * Callback fired when the error associated with the current value changes.
211
+ * When a validation error is detected, the `error` parameter contains a non-null value.
212
+ * This can be used to render an appropriate form error.
213
+ * @template TError The validation error type. It will be either `string` or a `null`. It can be in `[start, end]` format in case of range value.
214
+ * @template TValue The value type. It will be the same type as `value` or `null`. It can be in `[start, end]` format in case of range value.
215
+ * @param {TError} error The reason why the current value is not valid.
216
+ * @param {TValue} value The value associated with the error.
215
217
  */
216
218
  onError: PropTypes.func,
217
219
  /**
@@ -1,2 +1,2 @@
1
- export { MultiInputDateRangeField, getMultiInputDateRangeFieldUtilityClass, multiInputDateRangeFieldClasses } from './MultiInputDateRangeField';
2
- export { useMultiInputDateRangeField as unstable_useMultiInputDateRangeField } from '../internals/hooks/useMultiInputRangeField/useMultiInputDateRangeField';
1
+ export { MultiInputDateRangeField, getMultiInputDateRangeFieldUtilityClass, multiInputDateRangeFieldClasses } from "./MultiInputDateRangeField.js";
2
+ export { useMultiInputDateRangeField as unstable_useMultiInputDateRangeField } from "../internals/hooks/useMultiInputRangeField/useMultiInputDateRangeField.js";
@@ -12,7 +12,7 @@ import useSlotProps from '@mui/utils/useSlotProps';
12
12
  import { unstable_composeClasses as composeClasses, unstable_generateUtilityClass as generateUtilityClass, unstable_generateUtilityClasses as generateUtilityClasses } from '@mui/utils';
13
13
  import { splitFieldInternalAndForwardedProps, convertFieldResponseIntoMuiTextFieldProps } from '@mui/x-date-pickers/internals';
14
14
  import { PickersTextField } from '@mui/x-date-pickers/PickersTextField';
15
- import { useMultiInputDateTimeRangeField } from '../internals/hooks/useMultiInputRangeField/useMultiInputDateTimeRangeField';
15
+ import { useMultiInputDateTimeRangeField } from "../internals/hooks/useMultiInputRangeField/useMultiInputDateTimeRangeField.js";
16
16
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
17
17
  export const multiInputDateTimeRangeFieldClasses = generateUtilityClasses('MuiMultiInputDateTimeRangeField', ['root', 'separator']);
18
18
  export const getMultiInputDateTimeRangeFieldUtilityClass = slot => generateUtilityClass('MuiMultiInputDateTimeRangeField', slot);
@@ -26,7 +26,7 @@ const useUtilityClasses = ownerState => {
26
26
  };
27
27
  return composeClasses(slots, getMultiInputDateTimeRangeFieldUtilityClass, classes);
28
28
  };
29
- const MultiInputDateTimeRangeFieldRoot = styled( /*#__PURE__*/React.forwardRef((props, ref) => /*#__PURE__*/_jsx(Stack, _extends({
29
+ const MultiInputDateTimeRangeFieldRoot = styled(/*#__PURE__*/React.forwardRef((props, ref) => /*#__PURE__*/_jsx(Stack, _extends({
30
30
  ref: ref,
31
31
  spacing: 2,
32
32
  direction: "row",
@@ -233,18 +233,20 @@ process.env.NODE_ENV !== "production" ? MultiInputDateTimeRangeField.propTypes =
233
233
  minutesStep: PropTypes.number,
234
234
  /**
235
235
  * Callback fired when the value changes.
236
- * @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.
237
- * @template TError The validation error type. Will be either `string` or a `null`. Can be in `[start, end]` format in case of range value.
236
+ * @template TValue The value type. It will be the same type as `value` or `null`. It can be in `[start, end]` format in case of range value.
237
+ * @template TError The validation error type. It will be either `string` or a `null`. It can be in `[start, end]` format in case of range value.
238
238
  * @param {TValue} value The new value.
239
239
  * @param {FieldChangeHandlerContext<TError>} context The context containing the validation result of the current value.
240
240
  */
241
241
  onChange: PropTypes.func,
242
242
  /**
243
- * Callback fired when the error associated to the current value changes.
244
- * @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.
245
- * @template TError The validation error type. Will be either `string` or a `null`. Can be in `[start, end]` format in case of range value.
246
- * @param {TError} error The new error.
247
- * @param {TValue} value The value associated to the error.
243
+ * Callback fired when the error associated with the current value changes.
244
+ * When a validation error is detected, the `error` parameter contains a non-null value.
245
+ * This can be used to render an appropriate form error.
246
+ * @template TError The validation error type. It will be either `string` or a `null`. It can be in `[start, end]` format in case of range value.
247
+ * @template TValue The value type. It will be the same type as `value` or `null`. It can be in `[start, end]` format in case of range value.
248
+ * @param {TError} error The reason why the current value is not valid.
249
+ * @param {TValue} value The value associated with the error.
248
250
  */
249
251
  onError: PropTypes.func,
250
252
  /**
@@ -1,2 +1,2 @@
1
- export { MultiInputDateTimeRangeField, getMultiInputDateTimeRangeFieldUtilityClass, multiInputDateTimeRangeFieldClasses } from './MultiInputDateTimeRangeField';
2
- export { useMultiInputDateTimeRangeField as unstable_useMultiInputDateTimeRangeField } from '../internals/hooks/useMultiInputRangeField/useMultiInputDateTimeRangeField';
1
+ export { MultiInputDateTimeRangeField, getMultiInputDateTimeRangeFieldUtilityClass, multiInputDateTimeRangeFieldClasses } from "./MultiInputDateTimeRangeField.js";
2
+ export { useMultiInputDateTimeRangeField as unstable_useMultiInputDateTimeRangeField } from "../internals/hooks/useMultiInputRangeField/useMultiInputDateTimeRangeField.js";
@@ -12,7 +12,7 @@ import useSlotProps from '@mui/utils/useSlotProps';
12
12
  import { unstable_composeClasses as composeClasses, unstable_generateUtilityClass as generateUtilityClass, unstable_generateUtilityClasses as generateUtilityClasses } from '@mui/utils';
13
13
  import { splitFieldInternalAndForwardedProps, convertFieldResponseIntoMuiTextFieldProps } from '@mui/x-date-pickers/internals';
14
14
  import { PickersTextField } from '@mui/x-date-pickers/PickersTextField';
15
- import { useMultiInputTimeRangeField } from '../internals/hooks/useMultiInputRangeField/useMultiInputTimeRangeField';
15
+ import { useMultiInputTimeRangeField } from "../internals/hooks/useMultiInputRangeField/useMultiInputTimeRangeField.js";
16
16
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
17
17
  export const multiInputTimeRangeFieldClasses = generateUtilityClasses('MuiMultiInputTimeRangeField', ['root', 'separator']);
18
18
  export const getMultiInputTimeRangeFieldUtilityClass = slot => generateUtilityClass('MuiMultiInputTimeRangeField', slot);
@@ -26,7 +26,7 @@ const useUtilityClasses = ownerState => {
26
26
  };
27
27
  return composeClasses(slots, getMultiInputTimeRangeFieldUtilityClass, classes);
28
28
  };
29
- const MultiInputTimeRangeFieldRoot = styled( /*#__PURE__*/React.forwardRef((props, ref) => /*#__PURE__*/_jsx(Stack, _extends({
29
+ const MultiInputTimeRangeFieldRoot = styled(/*#__PURE__*/React.forwardRef((props, ref) => /*#__PURE__*/_jsx(Stack, _extends({
30
30
  ref: ref,
31
31
  spacing: 2,
32
32
  direction: "row",
@@ -215,18 +215,20 @@ process.env.NODE_ENV !== "production" ? MultiInputTimeRangeField.propTypes = {
215
215
  minutesStep: PropTypes.number,
216
216
  /**
217
217
  * Callback fired when the value changes.
218
- * @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.
219
- * @template TError The validation error type. Will be either `string` or a `null`. Can be in `[start, end]` format in case of range value.
218
+ * @template TValue The value type. It will be the same type as `value` or `null`. It can be in `[start, end]` format in case of range value.
219
+ * @template TError The validation error type. It will be either `string` or a `null`. It can be in `[start, end]` format in case of range value.
220
220
  * @param {TValue} value The new value.
221
221
  * @param {FieldChangeHandlerContext<TError>} context The context containing the validation result of the current value.
222
222
  */
223
223
  onChange: PropTypes.func,
224
224
  /**
225
- * Callback fired when the error associated to the current value changes.
226
- * @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.
227
- * @template TError The validation error type. Will be either `string` or a `null`. Can be in `[start, end]` format in case of range value.
228
- * @param {TError} error The new error.
229
- * @param {TValue} value The value associated to the error.
225
+ * Callback fired when the error associated with the current value changes.
226
+ * When a validation error is detected, the `error` parameter contains a non-null value.
227
+ * This can be used to render an appropriate form error.
228
+ * @template TError The validation error type. It will be either `string` or a `null`. It can be in `[start, end]` format in case of range value.
229
+ * @template TValue The value type. It will be the same type as `value` or `null`. It can be in `[start, end]` format in case of range value.
230
+ * @param {TError} error The reason why the current value is not valid.
231
+ * @param {TValue} value The value associated with the error.
230
232
  */
231
233
  onError: PropTypes.func,
232
234
  /**
@@ -1,2 +1,2 @@
1
- export { MultiInputTimeRangeField, getMultiInputTimeRangeFieldUtilityClass, multiInputTimeRangeFieldClasses } from './MultiInputTimeRangeField';
2
- export { useMultiInputTimeRangeField as unstable_useMultiInputTimeRangeField } from '../internals/hooks/useMultiInputRangeField/useMultiInputTimeRangeField';
1
+ export { MultiInputTimeRangeField, getMultiInputTimeRangeFieldUtilityClass, multiInputTimeRangeFieldClasses } from "./MultiInputTimeRangeField.js";
2
+ export { useMultiInputTimeRangeField as unstable_useMultiInputTimeRangeField } from "../internals/hooks/useMultiInputRangeField/useMultiInputTimeRangeField.js";
@@ -1 +1 @@
1
- export { PickersRangeCalendarHeader } from './PickersRangeCalendarHeader';
1
+ export { PickersRangeCalendarHeader } from "./PickersRangeCalendarHeader.js";
@@ -10,7 +10,7 @@ import { refType } from '@mui/utils';
10
10
  import { useClearableField } from '@mui/x-date-pickers/hooks';
11
11
  import { convertFieldResponseIntoMuiTextFieldProps } from '@mui/x-date-pickers/internals';
12
12
  import { PickersTextField } from '@mui/x-date-pickers/PickersTextField';
13
- import { useSingleInputDateRangeField } from './useSingleInputDateRangeField';
13
+ import { useSingleInputDateRangeField } from "./useSingleInputDateRangeField.js";
14
14
  import { jsx as _jsx } from "react/jsx-runtime";
15
15
  /**
16
16
  * Demos:
@@ -195,8 +195,8 @@ process.env.NODE_ENV !== "production" ? SingleInputDateRangeField.propTypes = {
195
195
  onBlur: PropTypes.func,
196
196
  /**
197
197
  * Callback fired when the value changes.
198
- * @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.
199
- * @template TError The validation error type. Will be either `string` or a `null`. Can be in `[start, end]` format in case of range value.
198
+ * @template TValue The value type. It will be the same type as `value` or `null`. It can be in `[start, end]` format in case of range value.
199
+ * @template TError The validation error type. It will be either `string` or a `null`. It can be in `[start, end]` format in case of range value.
200
200
  * @param {TValue} value The new value.
201
201
  * @param {FieldChangeHandlerContext<TError>} context The context containing the validation result of the current value.
202
202
  */
@@ -206,11 +206,13 @@ process.env.NODE_ENV !== "production" ? SingleInputDateRangeField.propTypes = {
206
206
  */
207
207
  onClear: PropTypes.func,
208
208
  /**
209
- * Callback fired when the error associated to the current value changes.
210
- * @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.
211
- * @template TError The validation error type. Will be either `string` or a `null`. Can be in `[start, end]` format in case of range value.
212
- * @param {TError} error The new error.
213
- * @param {TValue} value The value associated to the error.
209
+ * Callback fired when the error associated with the current value changes.
210
+ * When a validation error is detected, the `error` parameter contains a non-null value.
211
+ * This can be used to render an appropriate form error.
212
+ * @template TError The validation error type. It will be either `string` or a `null`. It can be in `[start, end]` format in case of range value.
213
+ * @template TValue The value type. It will be the same type as `value` or `null`. It can be in `[start, end]` format in case of range value.
214
+ * @param {TError} error The reason why the current value is not valid.
215
+ * @param {TValue} value The value associated with the error.
214
216
  */
215
217
  onError: PropTypes.func,
216
218
  onFocus: PropTypes.func,
@@ -1,2 +1,2 @@
1
- export { SingleInputDateRangeField } from './SingleInputDateRangeField';
2
- export { useSingleInputDateRangeField as unstable_useSingleInputDateRangeField } from './useSingleInputDateRangeField';
1
+ export { SingleInputDateRangeField } from "./SingleInputDateRangeField.js";
2
+ export { useSingleInputDateRangeField as unstable_useSingleInputDateRangeField } from "./useSingleInputDateRangeField.js";
@@ -1,7 +1,7 @@
1
1
  import * as React from 'react';
2
2
  import { useField, splitFieldInternalAndForwardedProps, useDefaultizedDateField } from '@mui/x-date-pickers/internals';
3
- import { rangeValueManager, getRangeFieldValueManager } from '../internals/utils/valueManagers';
4
- import { validateDateRange } from '../internals/utils/validation/validateDateRange';
3
+ import { rangeValueManager, getRangeFieldValueManager } from "../internals/utils/valueManagers.js";
4
+ import { validateDateRange } from "../internals/utils/validation/validateDateRange.js";
5
5
  export const useSingleInputDateRangeField = inProps => {
6
6
  const props = useDefaultizedDateField(inProps);
7
7
  const {
@@ -10,7 +10,7 @@ import { useThemeProps } from '@mui/material/styles';
10
10
  import { refType } from '@mui/utils';
11
11
  import useSlotProps from '@mui/utils/useSlotProps';
12
12
  import { useClearableField } from '@mui/x-date-pickers/hooks';
13
- import { useSingleInputDateTimeRangeField } from './useSingleInputDateTimeRangeField';
13
+ import { useSingleInputDateTimeRangeField } from "./useSingleInputDateTimeRangeField.js";
14
14
  import { jsx as _jsx } from "react/jsx-runtime";
15
15
  /**
16
16
  * Demos:
@@ -228,8 +228,8 @@ process.env.NODE_ENV !== "production" ? SingleInputDateTimeRangeField.propTypes
228
228
  onBlur: PropTypes.func,
229
229
  /**
230
230
  * Callback fired when the value changes.
231
- * @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.
232
- * @template TError The validation error type. Will be either `string` or a `null`. Can be in `[start, end]` format in case of range value.
231
+ * @template TValue The value type. It will be the same type as `value` or `null`. It can be in `[start, end]` format in case of range value.
232
+ * @template TError The validation error type. It will be either `string` or a `null`. It can be in `[start, end]` format in case of range value.
233
233
  * @param {TValue} value The new value.
234
234
  * @param {FieldChangeHandlerContext<TError>} context The context containing the validation result of the current value.
235
235
  */
@@ -239,11 +239,13 @@ process.env.NODE_ENV !== "production" ? SingleInputDateTimeRangeField.propTypes
239
239
  */
240
240
  onClear: PropTypes.func,
241
241
  /**
242
- * Callback fired when the error associated to the current value changes.
243
- * @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.
244
- * @template TError The validation error type. Will be either `string` or a `null`. Can be in `[start, end]` format in case of range value.
245
- * @param {TError} error The new error.
246
- * @param {TValue} value The value associated to the error.
242
+ * Callback fired when the error associated with the current value changes.
243
+ * When a validation error is detected, the `error` parameter contains a non-null value.
244
+ * This can be used to render an appropriate form error.
245
+ * @template TError The validation error type. It will be either `string` or a `null`. It can be in `[start, end]` format in case of range value.
246
+ * @template TValue The value type. It will be the same type as `value` or `null`. It can be in `[start, end]` format in case of range value.
247
+ * @param {TError} error The reason why the current value is not valid.
248
+ * @param {TValue} value The value associated with the error.
247
249
  */
248
250
  onError: PropTypes.func,
249
251
  onFocus: PropTypes.func,
@@ -1,2 +1,2 @@
1
- export { SingleInputDateTimeRangeField } from './SingleInputDateTimeRangeField';
2
- export { useSingleInputDateTimeRangeField as unstable_useSingleInputDateTimeRangeField } from './useSingleInputDateTimeRangeField';
1
+ export { SingleInputDateTimeRangeField } from "./SingleInputDateTimeRangeField.js";
2
+ export { useSingleInputDateTimeRangeField as unstable_useSingleInputDateTimeRangeField } from "./useSingleInputDateTimeRangeField.js";
@@ -1,7 +1,7 @@
1
1
  import * as React from 'react';
2
2
  import { useField, splitFieldInternalAndForwardedProps, useDefaultizedDateTimeField } from '@mui/x-date-pickers/internals';
3
- import { rangeValueManager, getRangeFieldValueManager } from '../internals/utils/valueManagers';
4
- import { validateDateTimeRange } from '../internals/utils/validation/validateDateTimeRange';
3
+ import { rangeValueManager, getRangeFieldValueManager } from "../internals/utils/valueManagers.js";
4
+ import { validateDateTimeRange } from "../internals/utils/validation/validateDateTimeRange.js";
5
5
  export const useSingleInputDateTimeRangeField = inProps => {
6
6
  const props = useDefaultizedDateTimeField(inProps);
7
7
  const {
@@ -10,7 +10,7 @@ import { PickersTextField } from '@mui/x-date-pickers/PickersTextField';
10
10
  import { useThemeProps } from '@mui/material/styles';
11
11
  import useSlotProps from '@mui/utils/useSlotProps';
12
12
  import { refType } from '@mui/utils';
13
- import { useSingleInputTimeRangeField } from './useSingleInputTimeRangeField';
13
+ import { useSingleInputTimeRangeField } from "./useSingleInputTimeRangeField.js";
14
14
  import { jsx as _jsx } from "react/jsx-runtime";
15
15
  /**
16
16
  * Demos:
@@ -210,8 +210,8 @@ process.env.NODE_ENV !== "production" ? SingleInputTimeRangeField.propTypes = {
210
210
  onBlur: PropTypes.func,
211
211
  /**
212
212
  * Callback fired when the value changes.
213
- * @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.
214
- * @template TError The validation error type. Will be either `string` or a `null`. Can be in `[start, end]` format in case of range value.
213
+ * @template TValue The value type. It will be the same type as `value` or `null`. It can be in `[start, end]` format in case of range value.
214
+ * @template TError The validation error type. It will be either `string` or a `null`. It can be in `[start, end]` format in case of range value.
215
215
  * @param {TValue} value The new value.
216
216
  * @param {FieldChangeHandlerContext<TError>} context The context containing the validation result of the current value.
217
217
  */
@@ -221,11 +221,13 @@ process.env.NODE_ENV !== "production" ? SingleInputTimeRangeField.propTypes = {
221
221
  */
222
222
  onClear: PropTypes.func,
223
223
  /**
224
- * Callback fired when the error associated to the current value changes.
225
- * @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.
226
- * @template TError The validation error type. Will be either `string` or a `null`. Can be in `[start, end]` format in case of range value.
227
- * @param {TError} error The new error.
228
- * @param {TValue} value The value associated to the error.
224
+ * Callback fired when the error associated with the current value changes.
225
+ * When a validation error is detected, the `error` parameter contains a non-null value.
226
+ * This can be used to render an appropriate form error.
227
+ * @template TError The validation error type. It will be either `string` or a `null`. It can be in `[start, end]` format in case of range value.
228
+ * @template TValue The value type. It will be the same type as `value` or `null`. It can be in `[start, end]` format in case of range value.
229
+ * @param {TError} error The reason why the current value is not valid.
230
+ * @param {TValue} value The value associated with the error.
229
231
  */
230
232
  onError: PropTypes.func,
231
233
  onFocus: PropTypes.func,
@@ -1,2 +1,2 @@
1
- export { SingleInputTimeRangeField } from './SingleInputTimeRangeField';
2
- export { useSingleInputTimeRangeField as unstable_useSingleInputTimeRangeField } from './useSingleInputTimeRangeField';
1
+ export { SingleInputTimeRangeField } from "./SingleInputTimeRangeField.js";
2
+ export { useSingleInputTimeRangeField as unstable_useSingleInputTimeRangeField } from "./useSingleInputTimeRangeField.js";
@@ -1,7 +1,7 @@
1
1
  import * as React from 'react';
2
2
  import { useField, splitFieldInternalAndForwardedProps, useDefaultizedTimeField } from '@mui/x-date-pickers/internals';
3
- import { rangeValueManager, getRangeFieldValueManager } from '../internals/utils/valueManagers';
4
- import { validateTimeRange } from '../internals/utils/validation/validateTimeRange';
3
+ import { rangeValueManager, getRangeFieldValueManager } from "../internals/utils/valueManagers.js";
4
+ import { validateTimeRange } from "../internals/utils/validation/validateTimeRange.js";
5
5
  export const useSingleInputTimeRangeField = inProps => {
6
6
  const props = useDefaultizedTimeField(inProps);
7
7
  const {