@mui/x-date-pickers-pro 7.15.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.
- package/CHANGELOG.md +98 -1
- package/DateRangeCalendar/DateRangeCalendar.js +11 -11
- package/DateRangeCalendar/index.js +2 -2
- package/DateRangeCalendar/useDragRange.js +1 -1
- package/DateRangePicker/DateRangePicker.js +13 -13
- package/DateRangePicker/DateRangePickerToolbar.js +1 -1
- package/DateRangePicker/index.js +3 -3
- package/DateRangePicker/shared.js +1 -1
- package/DateRangePickerDay/DateRangePickerDay.js +2 -2
- package/DateRangePickerDay/index.js +2 -2
- package/DateTimeRangePicker/DateTimeRangePicker.js +13 -13
- package/DateTimeRangePicker/DateTimeRangePickerTabs.js +1 -1
- package/DateTimeRangePicker/DateTimeRangePickerTimeWrapper.js +2 -2
- package/DateTimeRangePicker/DateTimeRangePickerToolbar.js +2 -2
- package/DateTimeRangePicker/index.js +5 -5
- package/DateTimeRangePicker/shared.js +2 -2
- package/DesktopDateRangePicker/DesktopDateRangePicker.js +17 -17
- package/DesktopDateRangePicker/index.js +1 -1
- package/DesktopDateTimeRangePicker/DesktopDateTimeRangePicker.js +19 -19
- package/DesktopDateTimeRangePicker/index.js +1 -1
- package/MobileDateRangePicker/MobileDateRangePicker.js +17 -17
- package/MobileDateRangePicker/index.js +1 -1
- package/MobileDateTimeRangePicker/MobileDateTimeRangePicker.js +19 -19
- package/MobileDateTimeRangePicker/index.js +1 -1
- package/MultiInputDateRangeField/MultiInputDateRangeField.js +11 -9
- package/MultiInputDateRangeField/index.js +2 -2
- package/MultiInputDateTimeRangeField/MultiInputDateTimeRangeField.js +11 -9
- package/MultiInputDateTimeRangeField/index.js +2 -2
- package/MultiInputTimeRangeField/MultiInputTimeRangeField.js +11 -9
- package/MultiInputTimeRangeField/index.js +2 -2
- package/PickersRangeCalendarHeader/index.js +1 -1
- package/SingleInputDateRangeField/SingleInputDateRangeField.js +10 -8
- package/SingleInputDateRangeField/index.js +2 -2
- package/SingleInputDateRangeField/useSingleInputDateRangeField.js +2 -2
- package/SingleInputDateTimeRangeField/SingleInputDateTimeRangeField.js +10 -8
- package/SingleInputDateTimeRangeField/index.js +2 -2
- package/SingleInputDateTimeRangeField/useSingleInputDateTimeRangeField.js +2 -2
- package/SingleInputTimeRangeField/SingleInputTimeRangeField.js +10 -8
- package/SingleInputTimeRangeField/index.js +2 -2
- package/SingleInputTimeRangeField/useSingleInputTimeRangeField.js +2 -2
- package/StaticDateRangePicker/StaticDateRangePicker.js +16 -16
- package/StaticDateRangePicker/index.js +1 -1
- package/dateRangeViewRenderers/dateRangeViewRenderers.js +1 -1
- package/dateRangeViewRenderers/index.js +1 -1
- package/index.js +19 -19
- package/internals/hooks/useDesktopRangePicker/index.js +1 -1
- package/internals/hooks/useDesktopRangePicker/useDesktopRangePicker.js +3 -3
- package/internals/hooks/useMobileRangePicker/index.js +1 -1
- package/internals/hooks/useMobileRangePicker/useMobileRangePicker.js +3 -3
- package/internals/hooks/useMultiInputRangeField/useMultiInputDateRangeField.js +4 -4
- package/internals/hooks/useMultiInputRangeField/useMultiInputDateTimeRangeField.js +4 -4
- package/internals/hooks/useMultiInputRangeField/useMultiInputTimeRangeField.js +4 -4
- package/internals/hooks/useStaticRangePicker/index.js +1 -1
- package/internals/hooks/useStaticRangePicker/useStaticRangePicker.js +1 -1
- package/internals/models/index.js +4 -4
- package/internals/utils/releaseInfo.js +1 -1
- package/internals/utils/validation/validateDateRange.js +1 -1
- package/internals/utils/validation/validateDateTimeRange.js +1 -1
- package/internals/utils/validation/validateTimeRange.js +1 -1
- package/internals/utils/valueManagers.js +1 -1
- package/models/index.js +5 -5
- package/modern/DateRangeCalendar/DateRangeCalendar.js +11 -11
- package/modern/DateRangeCalendar/index.js +2 -2
- package/modern/DateRangeCalendar/useDragRange.js +1 -1
- package/modern/DateRangePicker/DateRangePicker.js +13 -13
- package/modern/DateRangePicker/DateRangePickerToolbar.js +1 -1
- package/modern/DateRangePicker/index.js +3 -3
- package/modern/DateRangePicker/shared.js +1 -1
- package/modern/DateRangePickerDay/DateRangePickerDay.js +2 -2
- package/modern/DateRangePickerDay/index.js +2 -2
- package/modern/DateTimeRangePicker/DateTimeRangePicker.js +13 -13
- package/modern/DateTimeRangePicker/DateTimeRangePickerTabs.js +1 -1
- package/modern/DateTimeRangePicker/DateTimeRangePickerTimeWrapper.js +2 -2
- package/modern/DateTimeRangePicker/DateTimeRangePickerToolbar.js +2 -2
- package/modern/DateTimeRangePicker/index.js +5 -5
- package/modern/DateTimeRangePicker/shared.js +2 -2
- package/modern/DesktopDateRangePicker/DesktopDateRangePicker.js +17 -17
- package/modern/DesktopDateRangePicker/index.js +1 -1
- package/modern/DesktopDateTimeRangePicker/DesktopDateTimeRangePicker.js +19 -19
- package/modern/DesktopDateTimeRangePicker/index.js +1 -1
- package/modern/MobileDateRangePicker/MobileDateRangePicker.js +17 -17
- package/modern/MobileDateRangePicker/index.js +1 -1
- package/modern/MobileDateTimeRangePicker/MobileDateTimeRangePicker.js +19 -19
- package/modern/MobileDateTimeRangePicker/index.js +1 -1
- package/modern/MultiInputDateRangeField/MultiInputDateRangeField.js +11 -9
- package/modern/MultiInputDateRangeField/index.js +2 -2
- package/modern/MultiInputDateTimeRangeField/MultiInputDateTimeRangeField.js +11 -9
- package/modern/MultiInputDateTimeRangeField/index.js +2 -2
- package/modern/MultiInputTimeRangeField/MultiInputTimeRangeField.js +11 -9
- package/modern/MultiInputTimeRangeField/index.js +2 -2
- package/modern/PickersRangeCalendarHeader/index.js +1 -1
- package/modern/SingleInputDateRangeField/SingleInputDateRangeField.js +10 -8
- package/modern/SingleInputDateRangeField/index.js +2 -2
- package/modern/SingleInputDateRangeField/useSingleInputDateRangeField.js +2 -2
- package/modern/SingleInputDateTimeRangeField/SingleInputDateTimeRangeField.js +10 -8
- package/modern/SingleInputDateTimeRangeField/index.js +2 -2
- package/modern/SingleInputDateTimeRangeField/useSingleInputDateTimeRangeField.js +2 -2
- package/modern/SingleInputTimeRangeField/SingleInputTimeRangeField.js +10 -8
- package/modern/SingleInputTimeRangeField/index.js +2 -2
- package/modern/SingleInputTimeRangeField/useSingleInputTimeRangeField.js +2 -2
- package/modern/StaticDateRangePicker/StaticDateRangePicker.js +16 -16
- package/modern/StaticDateRangePicker/index.js +1 -1
- package/modern/dateRangeViewRenderers/dateRangeViewRenderers.js +1 -1
- package/modern/dateRangeViewRenderers/index.js +1 -1
- package/modern/index.js +19 -19
- package/modern/internals/hooks/useDesktopRangePicker/index.js +1 -1
- package/modern/internals/hooks/useDesktopRangePicker/useDesktopRangePicker.js +3 -3
- package/modern/internals/hooks/useMobileRangePicker/index.js +1 -1
- package/modern/internals/hooks/useMobileRangePicker/useMobileRangePicker.js +3 -3
- package/modern/internals/hooks/useMultiInputRangeField/useMultiInputDateRangeField.js +4 -4
- package/modern/internals/hooks/useMultiInputRangeField/useMultiInputDateTimeRangeField.js +4 -4
- package/modern/internals/hooks/useMultiInputRangeField/useMultiInputTimeRangeField.js +4 -4
- package/modern/internals/hooks/useStaticRangePicker/index.js +1 -1
- package/modern/internals/hooks/useStaticRangePicker/useStaticRangePicker.js +1 -1
- package/modern/internals/models/index.js +4 -4
- package/modern/internals/utils/releaseInfo.js +1 -1
- package/modern/internals/utils/validation/validateDateRange.js +1 -1
- package/modern/internals/utils/validation/validateDateTimeRange.js +1 -1
- package/modern/internals/utils/validation/validateTimeRange.js +1 -1
- package/modern/internals/utils/valueManagers.js +1 -1
- package/modern/models/index.js +5 -5
- package/modern/themeAugmentation/index.js +1 -4
- package/node/DateRangeCalendar/DateRangeCalendar.js +3 -4
- package/node/DateRangeCalendar/useDragRange.js +2 -3
- package/node/DateRangePicker/DateRangePicker.js +13 -14
- package/node/DateRangePicker/DateRangePickerToolbar.js +2 -3
- package/node/DateRangePicker/shared.js +2 -3
- package/node/DateRangePickerDay/DateRangePickerDay.js +2 -3
- package/node/DateTimeRangePicker/DateTimeRangePicker.js +13 -14
- package/node/DateTimeRangePicker/DateTimeRangePickerTabs.js +2 -3
- package/node/DateTimeRangePicker/DateTimeRangePickerTimeWrapper.js +1 -1
- package/node/DateTimeRangePicker/DateTimeRangePickerToolbar.js +2 -3
- package/node/DateTimeRangePicker/dateTimeRangePickerTabsClasses.js +1 -1
- package/node/DateTimeRangePicker/shared.js +1 -1
- package/node/DesktopDateRangePicker/DesktopDateRangePicker.js +13 -14
- package/node/DesktopDateTimeRangePicker/DesktopDateTimeRangePicker.js +13 -14
- package/node/MobileDateRangePicker/MobileDateRangePicker.js +13 -14
- package/node/MobileDateTimeRangePicker/MobileDateTimeRangePicker.js +13 -14
- package/node/MultiInputDateRangeField/MultiInputDateRangeField.js +12 -11
- package/node/MultiInputDateTimeRangeField/MultiInputDateTimeRangeField.js +12 -11
- package/node/MultiInputTimeRangeField/MultiInputTimeRangeField.js +12 -11
- package/node/PickersRangeCalendarHeader/PickersRangeCalendarHeader.js +2 -3
- package/node/SingleInputDateRangeField/SingleInputDateRangeField.js +11 -10
- package/node/SingleInputDateRangeField/useSingleInputDateRangeField.js +1 -2
- package/node/SingleInputDateTimeRangeField/SingleInputDateTimeRangeField.js +11 -10
- package/node/SingleInputDateTimeRangeField/useSingleInputDateTimeRangeField.js +1 -2
- package/node/SingleInputTimeRangeField/SingleInputTimeRangeField.js +11 -10
- package/node/SingleInputTimeRangeField/useSingleInputTimeRangeField.js +1 -2
- package/node/StaticDateRangePicker/StaticDateRangePicker.js +13 -14
- package/node/dateRangeViewRenderers/dateRangeViewRenderers.js +1 -2
- package/node/index.js +1 -1
- package/node/internals/hooks/useDesktopRangePicker/useDesktopRangePicker.js +2 -3
- package/node/internals/hooks/useEnrichedRangePickerFieldProps.js +2 -3
- package/node/internals/hooks/useMobileRangePicker/useMobileRangePicker.js +2 -3
- package/node/internals/hooks/useMultiInputFieldSelectedSections.js +2 -3
- package/node/internals/hooks/useMultiInputRangeField/useMultiInputDateRangeField.js +1 -1
- package/node/internals/hooks/useMultiInputRangeField/useMultiInputDateTimeRangeField.js +1 -1
- package/node/internals/hooks/useMultiInputRangeField/useMultiInputTimeRangeField.js +1 -1
- package/node/internals/hooks/useRangePosition.js +1 -1
- package/node/internals/hooks/useStaticRangePicker/useStaticRangePicker.js +2 -3
- package/node/internals/utils/date-fields-utils.js +1 -1
- package/node/internals/utils/releaseInfo.js +1 -1
- package/node/internals/utils/validation/validateDateRange.js +1 -1
- package/node/internals/utils/validation/validateDateTimeRange.js +1 -1
- package/node/internals/utils/valueManagers.js +1 -1
- package/node/themeAugmentation/index.js +0 -33
- package/package.json +5 -4
- package/themeAugmentation/index.d.ts +3 -3
- package/themeAugmentation/index.js +1 -4
|
@@ -2,10 +2,10 @@ import _extends from "@babel/runtime/helpers/esm/extends";
|
|
|
2
2
|
import useEventCallback from '@mui/utils/useEventCallback';
|
|
3
3
|
import { unstable_useDateField as useDateField } from '@mui/x-date-pickers/DateField';
|
|
4
4
|
import { useLocalizationContext, useValidation, useControlledValueWithTimezone, useDefaultizedDateField } from '@mui/x-date-pickers/internals';
|
|
5
|
-
import { validateDateRange } from
|
|
6
|
-
import { rangeValueManager } from
|
|
7
|
-
import { excludeProps } from
|
|
8
|
-
import { useMultiInputFieldSelectedSections } from
|
|
5
|
+
import { validateDateRange } from "../../utils/validation/validateDateRange.js";
|
|
6
|
+
import { rangeValueManager } from "../../utils/valueManagers.js";
|
|
7
|
+
import { excludeProps } from "./shared.js";
|
|
8
|
+
import { useMultiInputFieldSelectedSections } from "../useMultiInputFieldSelectedSections.js";
|
|
9
9
|
export const useMultiInputDateRangeField = ({
|
|
10
10
|
sharedProps: inSharedProps,
|
|
11
11
|
startTextFieldProps,
|
|
@@ -2,10 +2,10 @@ import _extends from "@babel/runtime/helpers/esm/extends";
|
|
|
2
2
|
import useEventCallback from '@mui/utils/useEventCallback';
|
|
3
3
|
import { unstable_useDateTimeField as useDateTimeField } from '@mui/x-date-pickers/DateTimeField';
|
|
4
4
|
import { useLocalizationContext, useValidation, useControlledValueWithTimezone, useDefaultizedDateTimeField } from '@mui/x-date-pickers/internals';
|
|
5
|
-
import { validateDateTimeRange } from
|
|
6
|
-
import { rangeValueManager } from
|
|
7
|
-
import { excludeProps } from
|
|
8
|
-
import { useMultiInputFieldSelectedSections } from
|
|
5
|
+
import { validateDateTimeRange } from "../../utils/validation/validateDateTimeRange.js";
|
|
6
|
+
import { rangeValueManager } from "../../utils/valueManagers.js";
|
|
7
|
+
import { excludeProps } from "./shared.js";
|
|
8
|
+
import { useMultiInputFieldSelectedSections } from "../useMultiInputFieldSelectedSections.js";
|
|
9
9
|
export const useMultiInputDateTimeRangeField = ({
|
|
10
10
|
sharedProps: inSharedProps,
|
|
11
11
|
startTextFieldProps,
|
|
@@ -2,10 +2,10 @@ import _extends from "@babel/runtime/helpers/esm/extends";
|
|
|
2
2
|
import useEventCallback from '@mui/utils/useEventCallback';
|
|
3
3
|
import { unstable_useTimeField as useTimeField } from '@mui/x-date-pickers/TimeField';
|
|
4
4
|
import { useLocalizationContext, useValidation, useControlledValueWithTimezone, useDefaultizedTimeField } from '@mui/x-date-pickers/internals';
|
|
5
|
-
import { validateTimeRange } from
|
|
6
|
-
import { rangeValueManager } from
|
|
7
|
-
import { excludeProps } from
|
|
8
|
-
import { useMultiInputFieldSelectedSections } from
|
|
5
|
+
import { validateTimeRange } from "../../utils/validation/validateTimeRange.js";
|
|
6
|
+
import { rangeValueManager } from "../../utils/valueManagers.js";
|
|
7
|
+
import { excludeProps } from "./shared.js";
|
|
8
|
+
import { useMultiInputFieldSelectedSections } from "../useMultiInputFieldSelectedSections.js";
|
|
9
9
|
export const useMultiInputTimeRangeField = ({
|
|
10
10
|
sharedProps: inSharedProps,
|
|
11
11
|
startTextFieldProps,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { useStaticRangePicker } from
|
|
1
|
+
export { useStaticRangePicker } from "./useStaticRangePicker.js";
|
|
@@ -7,7 +7,7 @@ import { styled } from '@mui/material/styles';
|
|
|
7
7
|
import { LocalizationProvider } from '@mui/x-date-pickers/LocalizationProvider';
|
|
8
8
|
import { PickersLayout } from '@mui/x-date-pickers/PickersLayout';
|
|
9
9
|
import { usePicker, DIALOG_WIDTH } from '@mui/x-date-pickers/internals';
|
|
10
|
-
import { useRangePosition } from
|
|
10
|
+
import { useRangePosition } from "../useRangePosition.js";
|
|
11
11
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
12
12
|
const PickerStaticLayout = styled(PickersLayout)(({
|
|
13
13
|
theme
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export * from
|
|
2
|
-
export * from
|
|
3
|
-
export * from
|
|
4
|
-
export * from
|
|
1
|
+
export * from "./dateRange.js";
|
|
2
|
+
export * from "./dateTimeRange.js";
|
|
3
|
+
export * from "./timeRange.js";
|
|
4
|
+
export * from "./rangePickerProps.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ponyfillGlobal } from '@mui/utils';
|
|
2
2
|
export const getReleaseInfo = () => {
|
|
3
|
-
const releaseInfo = "
|
|
3
|
+
const releaseInfo = "MTcyNTQ4MzYwMDAwMA==";
|
|
4
4
|
if (process.env.NODE_ENV !== 'production') {
|
|
5
5
|
// A simple hack to set the value in the test environment (has no build step).
|
|
6
6
|
// eslint-disable-next-line no-useless-concat
|
|
@@ -2,7 +2,7 @@ import _extends from "@babel/runtime/helpers/esm/extends";
|
|
|
2
2
|
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
3
3
|
const _excluded = ["shouldDisableDate"];
|
|
4
4
|
import { validateDate } from '@mui/x-date-pickers/internals';
|
|
5
|
-
import { isRangeValid } from
|
|
5
|
+
import { isRangeValid } from "../date-utils.js";
|
|
6
6
|
export const validateDateRange = ({
|
|
7
7
|
props,
|
|
8
8
|
value,
|
|
@@ -2,7 +2,7 @@ import _extends from "@babel/runtime/helpers/esm/extends";
|
|
|
2
2
|
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
3
3
|
const _excluded = ["shouldDisableDate"];
|
|
4
4
|
import { validateDateTime } from '@mui/x-date-pickers/internals';
|
|
5
|
-
import { isRangeValid } from
|
|
5
|
+
import { isRangeValid } from "../date-utils.js";
|
|
6
6
|
export const validateDateTimeRange = ({
|
|
7
7
|
props,
|
|
8
8
|
value,
|
|
@@ -2,7 +2,7 @@ import _extends from "@babel/runtime/helpers/esm/extends";
|
|
|
2
2
|
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
3
3
|
const _excluded = ["value", "referenceDate"];
|
|
4
4
|
import { replaceInvalidDateByNull, createDateStrForV7HiddenInputFromSections, createDateStrForV6InputFromSections, areDatesEqual, getTodayDate, getDefaultReferenceDate } from '@mui/x-date-pickers/internals';
|
|
5
|
-
import { splitDateRangeSections, removeLastSeparator } from
|
|
5
|
+
import { splitDateRangeSections, removeLastSeparator } from "./date-fields-utils.js";
|
|
6
6
|
export const rangeValueManager = {
|
|
7
7
|
emptyValue: [null, null],
|
|
8
8
|
getTodayValue: (utils, timezone, valueType) => [getTodayDate(utils, timezone, valueType), getTodayDate(utils, timezone, valueType)],
|
package/models/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export * from
|
|
2
|
-
export * from
|
|
3
|
-
export * from
|
|
4
|
-
export * from
|
|
5
|
-
export * from
|
|
1
|
+
export * from "./dateRange.js";
|
|
2
|
+
export * from "./fields.js";
|
|
3
|
+
export * from "./range.js";
|
|
4
|
+
export * from "./validation.js";
|
|
5
|
+
export * from "./multiInputRangeFieldClasses.js";
|
|
@@ -14,16 +14,16 @@ import composeClasses from '@mui/utils/composeClasses';
|
|
|
14
14
|
import useId from '@mui/utils/useId';
|
|
15
15
|
import { Watermark } from '@mui/x-license';
|
|
16
16
|
import { applyDefaultDate, DayCalendar, useDefaultReduceAnimations, useCalendarState, useDefaultDates, useUtils, useNow, DEFAULT_DESKTOP_MODE_MEDIA_QUERY, warnOnce, useControlledValueWithTimezone, useViews } from '@mui/x-date-pickers/internals';
|
|
17
|
-
import { getReleaseInfo } from
|
|
18
|
-
import { dateRangeCalendarClasses, getDateRangeCalendarUtilityClass } from
|
|
19
|
-
import { isEndOfRange, isRangeValid, isStartOfRange, isWithinRange } from
|
|
20
|
-
import { calculateRangeChange, calculateRangePreview } from
|
|
21
|
-
import { DateRangePickerDay, dateRangePickerDayClasses as dayClasses } from
|
|
22
|
-
import { rangeValueManager } from
|
|
23
|
-
import { useDragRange } from
|
|
24
|
-
import { useRangePosition } from
|
|
25
|
-
import { DAY_RANGE_SIZE, DAY_MARGIN } from
|
|
26
|
-
import { PickersRangeCalendarHeader } from
|
|
17
|
+
import { getReleaseInfo } from "../internals/utils/releaseInfo.js";
|
|
18
|
+
import { dateRangeCalendarClasses, getDateRangeCalendarUtilityClass } from "./dateRangeCalendarClasses.js";
|
|
19
|
+
import { isEndOfRange, isRangeValid, isStartOfRange, isWithinRange } from "../internals/utils/date-utils.js";
|
|
20
|
+
import { calculateRangeChange, calculateRangePreview } from "../internals/utils/date-range-manager.js";
|
|
21
|
+
import { DateRangePickerDay, dateRangePickerDayClasses as dayClasses } from "../DateRangePickerDay/index.js";
|
|
22
|
+
import { rangeValueManager } from "../internals/utils/valueManagers.js";
|
|
23
|
+
import { useDragRange } from "./useDragRange.js";
|
|
24
|
+
import { useRangePosition } from "../internals/hooks/useRangePosition.js";
|
|
25
|
+
import { DAY_RANGE_SIZE, DAY_MARGIN } from "../internals/constants/dimensions.js";
|
|
26
|
+
import { PickersRangeCalendarHeader } from "../PickersRangeCalendarHeader/index.js";
|
|
27
27
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
28
28
|
const releaseInfo = getReleaseInfo();
|
|
29
29
|
const DateRangeCalendarRoot = styled('div', {
|
|
@@ -587,7 +587,7 @@ process.env.NODE_ENV !== "production" ? DateRangeCalendar.propTypes = {
|
|
|
587
587
|
minDate: PropTypes.object,
|
|
588
588
|
/**
|
|
589
589
|
* Callback fired when the value changes.
|
|
590
|
-
* @template TValue The value type.
|
|
590
|
+
* @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.
|
|
591
591
|
* @template TView The view type. Will be one of date or time views.
|
|
592
592
|
* @param {TValue} value The new value.
|
|
593
593
|
* @param {PickerSelectionState | undefined} selectionState Indicates if the date selection is complete.
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { DateRangeCalendar } from
|
|
2
|
-
export { getDateRangeCalendarUtilityClass, dateRangeCalendarClasses } from
|
|
1
|
+
export { DateRangeCalendar } from "./DateRangeCalendar.js";
|
|
2
|
+
export { getDateRangeCalendarUtilityClass, dateRangeCalendarClasses } from "./dateRangeCalendarClasses.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
import useEventCallback from '@mui/utils/useEventCallback';
|
|
4
|
-
import { isEndOfRange, isStartOfRange } from
|
|
4
|
+
import { isEndOfRange, isStartOfRange } from "../internals/utils/date-utils.js";
|
|
5
5
|
const resolveDateFromTarget = (target, utils, timezone) => {
|
|
6
6
|
const timestampString = target.dataset.timestamp;
|
|
7
7
|
if (!timestampString) {
|
|
@@ -6,8 +6,8 @@ import PropTypes from 'prop-types';
|
|
|
6
6
|
import useMediaQuery from '@mui/material/useMediaQuery';
|
|
7
7
|
import { useThemeProps } from '@mui/material/styles';
|
|
8
8
|
import { refType } from '@mui/utils';
|
|
9
|
-
import { DesktopDateRangePicker } from
|
|
10
|
-
import { MobileDateRangePicker } from
|
|
9
|
+
import { DesktopDateRangePicker } from "../DesktopDateRangePicker/index.js";
|
|
10
|
+
import { MobileDateRangePicker } from "../MobileDateRangePicker/index.js";
|
|
11
11
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
12
12
|
/**
|
|
13
13
|
* Demos:
|
|
@@ -191,16 +191,16 @@ process.env.NODE_ENV !== "production" ? DateRangePicker.propTypes = {
|
|
|
191
191
|
name: PropTypes.string,
|
|
192
192
|
/**
|
|
193
193
|
* Callback fired when the value is accepted.
|
|
194
|
-
* @template TValue The value type.
|
|
195
|
-
* @template TError The validation error type.
|
|
194
|
+
* @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.
|
|
195
|
+
* @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.
|
|
196
196
|
* @param {TValue} value The value that was just accepted.
|
|
197
197
|
* @param {FieldChangeHandlerContext<TError>} context The context containing the validation result of the current value.
|
|
198
198
|
*/
|
|
199
199
|
onAccept: PropTypes.func,
|
|
200
200
|
/**
|
|
201
201
|
* Callback fired when the value changes.
|
|
202
|
-
* @template TValue The value type.
|
|
203
|
-
* @template TError The validation error type.
|
|
202
|
+
* @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.
|
|
203
|
+
* @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.
|
|
204
204
|
* @param {TValue} value The new value.
|
|
205
205
|
* @param {FieldChangeHandlerContext<TError>} context The context containing the validation result of the current value.
|
|
206
206
|
*/
|
|
@@ -211,13 +211,13 @@ process.env.NODE_ENV !== "production" ? DateRangePicker.propTypes = {
|
|
|
211
211
|
*/
|
|
212
212
|
onClose: PropTypes.func,
|
|
213
213
|
/**
|
|
214
|
-
* Callback fired when the error associated
|
|
215
|
-
*
|
|
216
|
-
*
|
|
217
|
-
* @template
|
|
218
|
-
* @template
|
|
219
|
-
* @param {TError} error The
|
|
220
|
-
* @param {TValue} value The value associated
|
|
214
|
+
* Callback fired when the error associated with the current value changes.
|
|
215
|
+
* When a validation error is detected, the `error` parameter contains a non-null value.
|
|
216
|
+
* This can be used to render an appropriate form error.
|
|
217
|
+
* @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.
|
|
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
|
+
* @param {TError} error The reason why the current value is not valid.
|
|
220
|
+
* @param {TValue} value The value associated with the error.
|
|
221
221
|
*/
|
|
222
222
|
onError: PropTypes.func,
|
|
223
223
|
/**
|
|
@@ -9,7 +9,7 @@ import { styled, useThemeProps } from '@mui/material/styles';
|
|
|
9
9
|
import composeClasses from '@mui/utils/composeClasses';
|
|
10
10
|
import { PickersToolbar, PickersToolbarButton, useUtils } from '@mui/x-date-pickers/internals';
|
|
11
11
|
import { usePickersTranslations } from '@mui/x-date-pickers/hooks';
|
|
12
|
-
import { getDateRangePickerToolbarUtilityClass } from
|
|
12
|
+
import { getDateRangePickerToolbarUtilityClass } from "./dateRangePickerToolbarClasses.js";
|
|
13
13
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
14
14
|
const useUtilityClasses = ownerState => {
|
|
15
15
|
const {
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { DateRangePicker } from
|
|
2
|
-
export { DateRangePickerToolbar } from
|
|
3
|
-
export { getDateRangePickerToolbarUtilityClass, dateRangePickerToolbarClasses } from
|
|
1
|
+
export { DateRangePicker } from "./DateRangePicker.js";
|
|
2
|
+
export { DateRangePickerToolbar } from "./DateRangePickerToolbar.js";
|
|
3
|
+
export { getDateRangePickerToolbarUtilityClass, dateRangePickerToolbarClasses } from "./dateRangePickerToolbarClasses.js";
|
|
@@ -2,7 +2,7 @@ import _extends from "@babel/runtime/helpers/esm/extends";
|
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
import { useThemeProps } from '@mui/material/styles';
|
|
4
4
|
import { useDefaultDates, useUtils, applyDefaultDate } from '@mui/x-date-pickers/internals';
|
|
5
|
-
import { DateRangePickerToolbar } from
|
|
5
|
+
import { DateRangePickerToolbar } from "./DateRangePickerToolbar.js";
|
|
6
6
|
export function useDateRangePickerDefaultizedProps(props, name) {
|
|
7
7
|
const utils = useUtils();
|
|
8
8
|
const defaultDates = useDefaultDates();
|
|
@@ -9,8 +9,8 @@ import { alpha, styled, useThemeProps } from '@mui/material/styles';
|
|
|
9
9
|
import composeClasses from '@mui/utils/composeClasses';
|
|
10
10
|
import { useUtils } from '@mui/x-date-pickers/internals';
|
|
11
11
|
import { PickersDay } from '@mui/x-date-pickers/PickersDay';
|
|
12
|
-
import { getDateRangePickerDayUtilityClass, dateRangePickerDayClasses } from
|
|
13
|
-
import { getReleaseInfo } from
|
|
12
|
+
import { getDateRangePickerDayUtilityClass, dateRangePickerDayClasses } from "./dateRangePickerDayClasses.js";
|
|
13
|
+
import { getReleaseInfo } from "../internals/utils/releaseInfo.js";
|
|
14
14
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
15
15
|
const releaseInfo = getReleaseInfo();
|
|
16
16
|
const useUtilityClasses = ownerState => {
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { DateRangePickerDay } from
|
|
2
|
-
export { getDateRangePickerDayUtilityClass, dateRangePickerDayClasses } from
|
|
1
|
+
export { DateRangePickerDay } from "./DateRangePickerDay.js";
|
|
2
|
+
export { getDateRangePickerDayUtilityClass, dateRangePickerDayClasses } from "./dateRangePickerDayClasses.js";
|
|
@@ -6,8 +6,8 @@ import PropTypes from 'prop-types';
|
|
|
6
6
|
import { refType } from '@mui/utils';
|
|
7
7
|
import useMediaQuery from '@mui/material/useMediaQuery';
|
|
8
8
|
import { useThemeProps } from '@mui/material/styles';
|
|
9
|
-
import { DesktopDateTimeRangePicker } from
|
|
10
|
-
import { MobileDateTimeRangePicker } from
|
|
9
|
+
import { DesktopDateTimeRangePicker } from "../DesktopDateTimeRangePicker/index.js";
|
|
10
|
+
import { MobileDateTimeRangePicker } from "../MobileDateTimeRangePicker/index.js";
|
|
11
11
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
12
12
|
/**
|
|
13
13
|
* Demos:
|
|
@@ -224,16 +224,16 @@ process.env.NODE_ENV !== "production" ? DateTimeRangePicker.propTypes = {
|
|
|
224
224
|
name: PropTypes.string,
|
|
225
225
|
/**
|
|
226
226
|
* Callback fired when the value is accepted.
|
|
227
|
-
* @template TValue The value type.
|
|
228
|
-
* @template TError The validation error type.
|
|
227
|
+
* @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.
|
|
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
229
|
* @param {TValue} value The value that was just accepted.
|
|
230
230
|
* @param {FieldChangeHandlerContext<TError>} context The context containing the validation result of the current value.
|
|
231
231
|
*/
|
|
232
232
|
onAccept: PropTypes.func,
|
|
233
233
|
/**
|
|
234
234
|
* Callback fired when the value changes.
|
|
235
|
-
* @template TValue The value type.
|
|
236
|
-
* @template TError The validation error type.
|
|
235
|
+
* @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.
|
|
236
|
+
* @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.
|
|
237
237
|
* @param {TValue} value The new value.
|
|
238
238
|
* @param {FieldChangeHandlerContext<TError>} context The context containing the validation result of the current value.
|
|
239
239
|
*/
|
|
@@ -244,13 +244,13 @@ process.env.NODE_ENV !== "production" ? DateTimeRangePicker.propTypes = {
|
|
|
244
244
|
*/
|
|
245
245
|
onClose: PropTypes.func,
|
|
246
246
|
/**
|
|
247
|
-
* Callback fired when the error associated
|
|
248
|
-
*
|
|
249
|
-
*
|
|
250
|
-
* @template
|
|
251
|
-
* @template
|
|
252
|
-
* @param {TError} error The
|
|
253
|
-
* @param {TValue} value The value associated
|
|
247
|
+
* Callback fired when the error associated with the current value changes.
|
|
248
|
+
* When a validation error is detected, the `error` parameter contains a non-null value.
|
|
249
|
+
* This can be used to render an appropriate form error.
|
|
250
|
+
* @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.
|
|
251
|
+
* @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.
|
|
252
|
+
* @param {TError} error The reason why the current value is not valid.
|
|
253
|
+
* @param {TValue} value The value associated with the error.
|
|
254
254
|
*/
|
|
255
255
|
onError: PropTypes.func,
|
|
256
256
|
/**
|
|
@@ -9,7 +9,7 @@ import { isDatePickerView } from '@mui/x-date-pickers/internals';
|
|
|
9
9
|
import { usePickersTranslations } from '@mui/x-date-pickers/hooks';
|
|
10
10
|
import IconButton from '@mui/material/IconButton';
|
|
11
11
|
import Button from '@mui/material/Button';
|
|
12
|
-
import { getDateTimeRangePickerTabsUtilityClass } from
|
|
12
|
+
import { getDateTimeRangePickerTabsUtilityClass } from "./dateTimeRangePickerTabsClasses.js";
|
|
13
13
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
14
14
|
const viewToTab = (view, rangePosition) => {
|
|
15
15
|
if (isDatePickerView(view)) {
|
|
@@ -2,8 +2,8 @@ import _extends from "@babel/runtime/helpers/esm/extends";
|
|
|
2
2
|
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
3
3
|
const _excluded = ["rangePosition", "onRangePositionChange", "viewRenderer", "value", "onChange", "defaultValue", "onViewChange", "views", "className"];
|
|
4
4
|
import { isInternalTimeView, useUtils } from '@mui/x-date-pickers/internals';
|
|
5
|
-
import { isRangeValid } from
|
|
6
|
-
import { calculateRangeChange } from
|
|
5
|
+
import { isRangeValid } from "../internals/utils/date-utils.js";
|
|
6
|
+
import { calculateRangeChange } from "../internals/utils/date-range-manager.js";
|
|
7
7
|
/**
|
|
8
8
|
* @ignore - internal component.
|
|
9
9
|
*/
|
|
@@ -9,8 +9,8 @@ import composeClasses from '@mui/utils/composeClasses';
|
|
|
9
9
|
import { useUtils } from '@mui/x-date-pickers/internals';
|
|
10
10
|
import { usePickersTranslations } from '@mui/x-date-pickers/hooks';
|
|
11
11
|
import { DateTimePickerToolbar } from '@mui/x-date-pickers/DateTimePicker';
|
|
12
|
-
import { getDateTimeRangePickerToolbarUtilityClass } from
|
|
13
|
-
import { calculateRangeChange } from
|
|
12
|
+
import { getDateTimeRangePickerToolbarUtilityClass } from "./dateTimeRangePickerToolbarClasses.js";
|
|
13
|
+
import { calculateRangeChange } from "../internals/utils/date-range-manager.js";
|
|
14
14
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
15
15
|
const useUtilityClasses = ownerState => {
|
|
16
16
|
const {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export { DateTimeRangePicker } from
|
|
2
|
-
export { DateTimeRangePickerTabs } from
|
|
3
|
-
export { getDateTimeRangePickerTabsUtilityClass, dateTimeRangePickerTabsClasses } from
|
|
4
|
-
export { DateTimeRangePickerToolbar } from
|
|
5
|
-
export { getDateTimeRangePickerToolbarUtilityClass, dateTimeRangePickerToolbarClasses } from
|
|
1
|
+
export { DateTimeRangePicker } from "./DateTimeRangePicker.js";
|
|
2
|
+
export { DateTimeRangePickerTabs } from "./DateTimeRangePickerTabs.js";
|
|
3
|
+
export { getDateTimeRangePickerTabsUtilityClass, dateTimeRangePickerTabsClasses } from "./dateTimeRangePickerTabsClasses.js";
|
|
4
|
+
export { DateTimeRangePickerToolbar } from "./DateTimeRangePickerToolbar.js";
|
|
5
|
+
export { getDateTimeRangePickerToolbarUtilityClass, dateTimeRangePickerToolbarClasses } from "./dateTimeRangePickerToolbarClasses.js";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
2
|
import { useThemeProps } from '@mui/material/styles';
|
|
3
3
|
import { useDefaultDates, useUtils, applyDefaultDate, applyDefaultViewProps, resolveTimeViewsResponse } from '@mui/x-date-pickers/internals';
|
|
4
|
-
import { DateTimeRangePickerToolbar } from
|
|
5
|
-
import { DateTimeRangePickerTabs } from
|
|
4
|
+
import { DateTimeRangePickerToolbar } from "./DateTimeRangePickerToolbar.js";
|
|
5
|
+
import { DateTimeRangePickerTabs } from "./DateTimeRangePickerTabs.js";
|
|
6
6
|
export function useDateTimeRangePickerDefaultizedProps(props, name) {
|
|
7
7
|
const utils = useUtils();
|
|
8
8
|
const defaultDates = useDefaultDates();
|
|
@@ -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
|
|
8
|
-
import { useDateRangePickerDefaultizedProps } from
|
|
9
|
-
import { renderDateRangeViewCalendar } from
|
|
10
|
-
import { MultiInputDateRangeField } from
|
|
11
|
-
import { useDesktopRangePicker } from
|
|
12
|
-
import { validateDateRange } from
|
|
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 { useDesktopRangePicker } from "../internals/hooks/useDesktopRangePicker/index.js";
|
|
12
|
+
import { validateDateRange } from "../internals/utils/validation/validateDateRange.js";
|
|
13
13
|
/**
|
|
14
14
|
* Demos:
|
|
15
15
|
*
|
|
@@ -196,16 +196,16 @@ DesktopDateRangePicker.propTypes = {
|
|
|
196
196
|
name: PropTypes.string,
|
|
197
197
|
/**
|
|
198
198
|
* Callback fired when the value is accepted.
|
|
199
|
-
* @template TValue The value type.
|
|
200
|
-
* @template TError The validation error type.
|
|
199
|
+
* @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.
|
|
200
|
+
* @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.
|
|
201
201
|
* @param {TValue} value The value that was just accepted.
|
|
202
202
|
* @param {FieldChangeHandlerContext<TError>} context The context containing the validation result of the current value.
|
|
203
203
|
*/
|
|
204
204
|
onAccept: PropTypes.func,
|
|
205
205
|
/**
|
|
206
206
|
* Callback fired when the value changes.
|
|
207
|
-
* @template TValue The value type.
|
|
208
|
-
* @template TError The validation error type.
|
|
207
|
+
* @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.
|
|
208
|
+
* @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.
|
|
209
209
|
* @param {TValue} value The new value.
|
|
210
210
|
* @param {FieldChangeHandlerContext<TError>} context The context containing the validation result of the current value.
|
|
211
211
|
*/
|
|
@@ -216,13 +216,13 @@ DesktopDateRangePicker.propTypes = {
|
|
|
216
216
|
*/
|
|
217
217
|
onClose: PropTypes.func,
|
|
218
218
|
/**
|
|
219
|
-
* Callback fired when the error associated
|
|
220
|
-
*
|
|
221
|
-
*
|
|
222
|
-
* @template
|
|
223
|
-
* @template
|
|
224
|
-
* @param {TError} error The
|
|
225
|
-
* @param {TValue} value The value associated
|
|
219
|
+
* Callback fired when the error associated with the current value changes.
|
|
220
|
+
* When a validation error is detected, the `error` parameter contains a non-null value.
|
|
221
|
+
* This can be used to render an appropriate form error.
|
|
222
|
+
* @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.
|
|
223
|
+
* @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.
|
|
224
|
+
* @param {TError} error The reason why the current value is not valid.
|
|
225
|
+
* @param {TValue} value The value associated with the error.
|
|
226
226
|
*/
|
|
227
227
|
onError: PropTypes.func,
|
|
228
228
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { DesktopDateRangePicker } from
|
|
1
|
+
export { DesktopDateRangePicker } from "./DesktopDateRangePicker.js";
|
|
@@ -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
|
|
15
|
-
import { renderDateRangeViewCalendar } from
|
|
16
|
-
import { useDesktopRangePicker } from
|
|
17
|
-
import { validateDateTimeRange } from
|
|
18
|
-
import { useDateTimeRangePickerDefaultizedProps } from
|
|
19
|
-
import { MultiInputDateTimeRangeField } from
|
|
20
|
-
import { DateTimeRangePickerTimeWrapper } from
|
|
21
|
-
import { RANGE_VIEW_HEIGHT } from
|
|
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 {
|
|
@@ -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.
|
|
308
|
-
* @template TError The validation error type.
|
|
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.
|
|
316
|
-
* @template TError The validation error type.
|
|
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
|
|
328
|
-
*
|
|
329
|
-
*
|
|
330
|
-
* @template
|
|
331
|
-
* @template
|
|
332
|
-
* @param {TError} error The
|
|
333
|
-
* @param {TValue} value The value associated
|
|
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
|
|
1
|
+
export { DesktopDateTimeRangePicker } from "./DesktopDateTimeRangePicker.js";
|