Skip to content

Commit

Permalink
Work
Browse files Browse the repository at this point in the history
  • Loading branch information
flaviendelangle committed Apr 12, 2022
1 parent 4c61557 commit 2556721
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions packages/x-date-pickers/src/DateTimePicker/shared.ts
Original file line number Diff line number Diff line change
Expand Up @@ -102,10 +102,6 @@ export function useDateTimePickerDefaultizedProps<
orientation: 'portrait',
openTo: 'day',
views: ['year', 'day', 'hours', 'minutes'],
minDate: themeProps.minDateTime ?? themeProps.minDate ?? defaultDates.minDate,
maxDate: themeProps.maxDateTime ?? themeProps.maxDate ?? defaultDates.maxDate,
minTime: themeProps.minDateTime ?? themeProps.minTime,
maxTime: themeProps.maxDateTime ?? themeProps.maxTime,
ampmInClock: true,
showToolbar: false,
allowSameDateSelection: true,
Expand All @@ -117,5 +113,9 @@ export function useDateTimePickerDefaultizedProps<
themeProps.minDateTime || themeProps.maxDateTime,
),
...themeProps,
minDate: themeProps.minDateTime ?? themeProps.minDate ?? defaultDates.minDate,
maxDate: themeProps.maxDateTime ?? themeProps.maxDate ?? defaultDates.maxDate,
minTime: themeProps.minDateTime ?? themeProps.minTime,
maxTime: themeProps.maxDateTime ?? themeProps.maxTime,
};
}

0 comments on commit 2556721

Please sign in to comment.