BalanceReckon Design System

DatePicker

A calendar-based picker for selecting exact dates and date ranges.

CalendarProps

PropTypeRequiredDefaultDescription
canChangeMonthboolean—true—
captionElement| React.ReactElement<Partial<CaptionElementProps>> | React.ComponentClass<CaptionElementProps> | React.SFC<CaptionElementProps>———
classNamestring———
classNamesClassNames———
containerPropsReact.DetailedHTMLProps< React.HTMLAttributes<HTMLDivElement>, HTMLDivElement >———
dirstring———
disabledDaysModifier | Modifier[]———
enableOutsideDaysClickboolean———
firstDayOfWeeknumber———
fixedWeeksboolean———
fromMonthDate———
initialMonthDate———
labels{ previousMonth: string; nextMonth: string }———
localestring———
localeUtilsLocaleUtils———
modifiersPartial<Modifiers>———
modifiersStylesobject———
monthDate———
monthsstring[]———
navbarElement| React.ReactElement<Partial<NavbarElementProps>> | React.ComponentClass<NavbarElementProps> | React.SFC<NavbarElementProps>———
numberOfMonthsnumber—1—
onBlur(e: React.FocusEvent<HTMLDivElement>) => void———
onCaptionClick(month: Date, e: React.MouseEvent<HTMLDivElement>) => void———
onDayClick( day: Date, modifiers: DayModifiers, e: React.MouseEvent<HTMLDivElement> ) => void———
onDayKeyDown( day: Date, modifiers: DayModifiers, e: React.KeyboardEvent<HTMLDivElement> ) => void———
onDayMouseDown( day: Date, modifiers: DayModifiers, e: React.MouseEvent<HTMLDivElement> ) => void———
onDayMouseEnter( day: Date, modifiers: DayModifiers, e: React.MouseEvent<HTMLDivElement> ) => void———
onDayMouseLeave( day: Date, modifiers: DayModifiers, e: React.MouseEvent<HTMLDivElement> ) => void———
onDayMouseUp( day: Date, modifiers: DayModifiers, e: React.MouseEvent<HTMLDivElement> ) => void———
onDayTouchEnd( day: Date, modifiers: DayModifiers, e: React.TouchEvent<HTMLDivElement> ) => void———
onDayTouchStart( day: Date, modifiers: DayModifiers, e: React.TouchEvent<HTMLDivElement> ) => void———
onFocus(e: React.FocusEvent<HTMLDivElement>) => void———
onKeyDown(e: React.KeyboardEvent<HTMLDivElement>) => void———
onMonthChange(month: Date) => void———
onTodayButtonClick( day: Date, modifiers: DayModifiers, e: React.MouseEvent<HTMLButtonElement> ) => void———
onWeekClick( weekNumber: number, days: Date[], e: React.MouseEvent<HTMLDivElement> ) => void———
pagedNavigationboolean———
renderDay(date: Date, modifiers: DayModifiers) => React.ReactNode———
renderWeek( weekNumber: number, week: Date[], month: Date ) => React.ReactNode———
reverseMonthsboolean———
selectedDaysModifier | Modifier[]———
showOutsideDaysboolean———
showWeekDaysboolean———
showWeekNumbersboolean———
tabIndexnumber———
todayButtonstring———
toMonthDate———
weekdayElement| React.ReactElement<Partial<WeekdayElementProps>> | React.ComponentClass<WeekdayElementProps> | React.SFC<WeekdayElementProps>———
weekdaysLongstring[]———
weekdaysShortstring[]———

DatePickerProps

PropTypeRequiredDefaultDescription
disabledboolean——When true, the trigger will be disabled and the clear button is removed.
idstring———
invalidboolean——Indicate that the value does not conform to the format expected by the application.
keyboardShortcutLegendPosition
left|right
—left—
onChange(value: ISODate | undefined) => voidYes—Called when the value changes.
onClear() => voidYes—Called when the value is cleared.
readOnlyboolean——When true, the value will be disabled as text
sizeInputSizeType
xsmall|small|medium|large
—medium—
valueISODate | undefinedYes—The value of the calendar, displayed in the trigger.
Also accepts Pick< CalendarProps, 'disabledDays' | 'fromMonth' | 'initialMonth' | 'modifiers' | 'toMonth' >

AGGridDatePickerProps

PropTypeRequiredDefaultDescription
agGridPropsCustomCellEditorProps<any, Date | undefined>Yes—These are the props you get from AG Grid when creating a custom cell editor. You're supposed to pass them directly to this component.
ariaLabelstring——Accessible name for the editor input.
keyboardShortcutLegendPosition
left|right
Yes——
Also accepts Pick< CalendarProps, 'disabledDays' | 'fromMonth' | 'initialMonth' | 'modifiers' | 'toMonth' >

DateRangePickerProps

PropTypeRequiredDefaultDescription
disabledboolean—falseWhen true, the triggers will be disabled.
idstring——Additional props to pass to the input element.
invalidboolean——Indicate that the value does not conform to the format expected by the application.
onChange(value: ISODateRange | undefined) => voidYes—Called when the value changes.
onClear() => void——Called when the value is cleared.
popoverClassNamestring——Class name added to the calendar popover dialog.
sizeInputSizeType
xsmall|small|medium|large
—medium—
valueISODateRange | undefinedYes—The value of the calendar, displayed in the trigger.
Also accepts Pick< CalendarProps, 'disabledDays' | 'fromMonth' | 'initialMonth' | 'modifiers' | 'toMonth' >