diff --git a/components/calendar/types/index.d.ts b/components/calendar/types/index.d.ts index cd9864c57..1ba2bc42e 100644 --- a/components/calendar/types/index.d.ts +++ b/components/calendar/types/index.d.ts @@ -33,10 +33,6 @@ export interface CalendarProps { * the direction of the library - internally the library will use rtl for rtl-languages but this can be overridden here for more control */ dir?: CalendarDir - /** - * the date format - */ - format?: 'YYYY-MM-DD' | 'DD-MM-YYYY' /** * any valid locale - if none provided, the internal library will fallback to the user locale (more info here: https://github.com/dhis2/multi-calendar-dates/blob/main/src/hooks/internal/useResolvedLocaleOptions.ts#L15) */ @@ -62,6 +58,12 @@ export interface CalendarProps { export const Calendar: React.FC export type CalendarInputProps = Omit & - CalendarProps + CalendarProps & { + /** + * Optional format for the date. Determines how the date is displayed + * or processed. If not provided it supports both formats + */ + format?: 'YYYY-MM-DD' | 'DD-MM-YYYY' + } export const CalendarInput: React.FC