Documentation / @jalali-js/react / DatePickerProps
Interface: DatePickerProps
Defined in: react/src/DatePicker.tsx:22
Properties
className?
optionalclassName?:string
Defined in: react/src/DatePicker.tsx:62
defaultDate?
optionaldefaultDate?:CalendarDate|CalendarDateTime|null
Defined in: react/src/DatePicker.tsx:31
The initial selection. Default: today, in system. Pass null for no initial selection, so the picker opens empty and shows placeholder until a person picks a date.
disabledHours?
optionaldisabledHours?: readonlynumber[]
Defined in: react/src/DatePicker.tsx:40
Hours that do not appear in the time panel (0-23). Used only when precision is 'datetime'.
displayFormat?
optionaldisplayFormat?:FormatOptions
Defined in: react/src/DatePicker.tsx:55
How the date reads inside the picker's own text input / month title.
locale?
optionallocale?:LocaleCode
Defined in: react/src/DatePicker.tsx:26
Which language the picker's text reads in. Default: 'en'.
minuteStep?
optionalminuteStep?:number
Defined in: react/src/DatePicker.tsx:38
Minute options step for the time panel. Default: 1. Used only when precision is 'datetime'.
onChange?
optionalonChange?: (value,date) =>void
Defined in: react/src/DatePicker.tsx:51
Called with the selection, in both forms: value, shaped by valueFormat (what an app should store), and date, the raw calendar value (what an app should keep displaying). See architecture.md's "Display value against storage value" for why these can differ.
Parameters
value
date
CalendarDate | CalendarDateTime
Returns
void
placeholder?
optionalplaceholder?:string
Defined in: react/src/DatePicker.tsx:61
precision?
optionalprecision?:DatePickerPrecision
Defined in: react/src/DatePicker.tsx:36
'date' (default) selects a day only. 'datetime' adds a time panel under the grid and emits a CalendarDateTime through the storage-value contract.
quickNav?
optionalquickNav?:boolean
Defined in: react/src/DatePicker.tsx:45
Let a person click the month or year in the grid popover's header to jump straight to a month grid or a year grid. Default: true. Has no effect on the dropdown variant.
rules?
optionalrules?:SelectionRules
Defined in: react/src/DatePicker.tsx:60
Limits on what a person can select. Grid variant only; see CalendarProps.rules.
system?
optionalsystem?:CalendarSystem
Defined in: react/src/DatePicker.tsx:24
Which calendar system the picker displays and selects in. Default: 'jalali'.
valueFormat?
optionalvalueFormat?:ValueFormat
Defined in: react/src/DatePicker.tsx:53
How value (above) is shaped. Default: 'gregorian-iso', a calendar-agnostic value.
variant?
optionalvariant?:"grid"|"dropdown"
Defined in: react/src/DatePicker.tsx:58
'grid': a calendar-grid popup (default). 'dropdown': three year/month/day <select>s, better suited to narrow, known-range entry such as a date of birth.