diff --git a/packages/x-date-pickers/src/DatePicker/DatePicker.types.ts b/packages/x-date-pickers/src/DatePicker/DatePicker.types.ts index 99570bb487779..73954ef313bf1 100644 --- a/packages/x-date-pickers/src/DatePicker/DatePicker.types.ts +++ b/packages/x-date-pickers/src/DatePicker/DatePicker.types.ts @@ -52,4 +52,9 @@ export interface DatePickerProps< * @default 4 on desktop, 3 on mobile */ yearsPerRow?: 3 | 4; + /** + * If `true`, the popover or modal will close after submitting the full date. + * @default `true` for desktop, `false` for mobile variants (based on the chosen wrapper and `desktopModeMediaQuery` prop). + */ + closeOnSelect?: UsePickerValueNonStaticProps['closeOnSelect']; } diff --git a/packages/x-date-pickers/src/DesktopDatePicker/DesktopDatePicker.types.ts b/packages/x-date-pickers/src/DesktopDatePicker/DesktopDatePicker.types.ts index b9de15ce40ed9..3747fdca333d1 100644 --- a/packages/x-date-pickers/src/DesktopDatePicker/DesktopDatePicker.types.ts +++ b/packages/x-date-pickers/src/DesktopDatePicker/DesktopDatePicker.types.ts @@ -12,6 +12,7 @@ import { MakeOptional } from '../internals/models/helpers'; import { DateView, PickerValidDate } from '../models'; import { UsePickerValueNonStaticProps } from '../internals/hooks/usePicker/usePickerValue.types'; import { ExportedYearCalendarProps } from '../YearCalendar/YearCalendar.types'; +import { UsePickerValueNonStaticProps } from '../internals/hooks/usePicker/usePickerValue.types'; export interface DesktopDatePickerSlots extends BaseDatePickerSlots, @@ -49,4 +50,9 @@ export interface DesktopDatePickerProps< * @default 4 */ yearsPerRow?: 3 | 4; + /** + * If `true`, the popover or modal will close after submitting the full date. + * @default `true` + */ + closeOnSelect?: UsePickerValueNonStaticProps['closeOnSelect']; }