Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions docs/data/migration/migration-pickers-v7/migration-pickers-v7.md
Original file line number Diff line number Diff line change
Expand Up @@ -789,6 +789,25 @@ The `TSection` generic of the `FieldRef` type has been replaced with the `TValue
The following types are no longer exported by `@mui/x-date-pickers` and/or `@mui/x-date-pickers-pro`.
If you were using them, you need to replace them with the following code:

- `NonEmptyDateRange`

```ts
// When using AdapterDayjs
import { Dayjs } from 'dayjs';
type NonEmptyDateRange = [Dayjs, Dayjs];

// When using AdapterLuxon
import { DateTime } from 'luxon';
type NonEmptyDateRange = [DateTime, DateTime];

// When using AdapterMoment, AdapterMomentJalaali or AdapterMomentHijri
import { Moment } from 'moment';
type NonEmptyDateRange = [Moment, Moment];

// When using AdapterDateFns, AdapterDateFnsV3, AdapterDateFnsJalali or AdapterDateFnsJalaliV3
type NonEmptyDateRange = [Date, Date];
```

- `UseDateFieldComponentProps`

```ts
Expand Down
3 changes: 0 additions & 3 deletions packages/x-date-pickers-pro/src/models/range.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,3 @@ import { PickerValidDate } from '@mui/x-date-pickers/models';

// Should not be used in our packages, instead use `PickerRangeValue` from the community package.
export type DateRange<TDate extends PickerValidDate> = [TDate | null, TDate | null];

// TODO v8: Remove
export type NonEmptyDateRange = [PickerValidDate, PickerValidDate];
Original file line number Diff line number Diff line change
Expand Up @@ -736,7 +736,7 @@ export const mergeDateIntoReferenceDate = (

export const isAndroid = () => navigator.userAgent.toLowerCase().includes('android');

// TODO v8: Remove if we drop the v6 TextField approach.
// TODO v9: Remove
export const getSectionOrder = (
sections: FieldSection[],
shouldApplyRTL: boolean,
Expand Down
1 change: 0 additions & 1 deletion scripts/x-date-pickers-pro.exports.json
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,6 @@
{ "name": "MultiSectionDigitalClockSectionClassKey", "kind": "TypeAlias" },
{ "name": "MultiSectionDigitalClockSlotProps", "kind": "Interface" },
{ "name": "MultiSectionDigitalClockSlots", "kind": "Interface" },
{ "name": "NonEmptyDateRange", "kind": "TypeAlias" },
{ "name": "OnErrorProps", "kind": "Interface" },
{ "name": "PickerChangeHandlerContext", "kind": "Interface" },
{ "name": "PickerChangeImportance", "kind": "TypeAlias" },
Expand Down