Skip to content
Closed
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
16 changes: 16 additions & 0 deletions components/calendar/types/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,10 @@ export interface CalendarProps {
* numbering system to use - full list here https://github.com/dhis2/multi-calendar-dates/blob/main/src/constants/numberingSystems.ts
*/
numberingSystem?: CalendarPickerOptions['numberingSystem']
/**
* When true, only shows years in the past (current year and earlier)
*/
pastOnly?: boolean
/**
* the timeZone to use
*/
Expand All @@ -64,6 +68,18 @@ export type CalendarInputProps = Omit<InputFieldProps, 'type' | 'value'> &
* or processed. If not provided it supports both formats
*/
format?: 'YYYY-MM-DD' | 'DD-MM-YYYY'
/**
* The maximum selectable date
*/
maxDate?: string
/**
* The minimum selectable date
*/
minDate?: string
/**
* Whether to use strict validation by showing errors for out-of-range dates when enabled (default), and warnings when disabled
*/
strictValidation?: boolean
}

export const CalendarInput: React.FC<CalendarInputProps>
Loading