Skip to content

Commit

Permalink
add description for DatePicker and DateRangePicker
Browse files Browse the repository at this point in the history
  • Loading branch information
Arthur Balduini authored and Arthur Balduini committed Sep 30, 2024
1 parent d3853e3 commit 83349bd
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
5 changes: 5 additions & 0 deletions packages/x-date-pickers/src/DatePicker/DatePicker.types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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'];
}
Original file line number Diff line number Diff line change
Expand Up @@ -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<TDate extends PickerValidDate>
extends BaseDatePickerSlots<TDate>,
Expand Down Expand Up @@ -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'];
}

0 comments on commit 83349bd

Please sign in to comment.