Flutter docs
Default skin

Calendar

A container that displays data in calendar form.

When to use

When data is in the form of dates, such as schedules, timetables, prices calendar, lunar calendar. This component also supports Year/Month switch.

Examples

Basic

A basic calendar component with Year/Month switch.

Notice Calendar

This component can be rendered by using dateCellRender and monthCellRender with the data you need.

Event Range

Render event ranges across days with cellRender. The example calculates whether each date is the start, middle, end, or a single-day event and draws compact range bars.

Card

Nested inside a container element for rendering in limited space.

Selectable Calendar

A basic calendar component with Year/Month switch.

Annotated Calendar

Annotate each cell with a second layer of meaning — holidays, ISO weeks, fiscal quarters — with fullCellRender and a custom header.

Show Week

Show week number in fullscreen calendar by setting showWeek prop to true.

Customize Header

Customize Calendar header content.

Custom semantic dom styling

You can customize the semantic dom style of Calendar by passing objects/functions through classNames and styles.

API

Calendar are exported from @ceebee/ui/client.

Calendar

PropertyDescriptionTypeDefaultVersion
cellRenderCustomize cell contentfunction(current: dayjs, info: { prefixCls: string, originNode: React.ReactElement, today: dayjs, range?: 'start' | 'end', type: PanelMode, locale?: Locale, subType?: 'hour' | 'minute' | 'second' | 'meridiem' }) => React.ReactNode-5.4.0
classNamesCustomize class for each semantic structure inside the component. Supports object or function.Record<SemanticDOM, string> | (info: { props })=> Record<SemanticDOM, string>-—
dateFullCellRenderCustomize the display of the date cell, the returned content will override the cell. Please use fullCellRender instead in 5.4.0 and laterfunction(date: Dayjs): ReactNode-< 5.4.0
fullCellRenderCustomize cell contentfunction(current: dayjs, info: { prefixCls: string, originNode: React.ReactElement, today: dayjs, range?: 'start' | 'end', type: PanelMode, locale?: Locale, subType?: 'hour' | 'minute' | 'second' | 'meridiem' }) => React.ReactNode-5.4.0
defaultValueThe date selected by defaultdayjs-—
disabledDateFunction that specifies the dates that cannot be selected, currentDate is same dayjs object as value prop which you shouldn't mutate it (https://github.com/ant-design/ant-design/issues/30987)(currentDate: Dayjs) => boolean-—
fullscreenWhether to display in full-screenbooleantrue—
showWeekWhether to display week numberbooleanfalse5.23.0
stylesCustomize inline style for each semantic structure inside the component. Supports object or function.Record<SemanticDOM, CSSProperties> | (info: { props })=> Record<SemanticDOM, CSSProperties>-—
headerRenderRender custom header in panelfunction(object:{value: Dayjs, type: 'year' | 'month', onChange: f(), onTypeChange: f()})-—
localeThe calendar's localeobject(default)—
modeThe display mode of the calendarmonth | yearmonth—
validRangeTo set valid range\[dayjs, dayjs]-—
valueThe current selected datedayjs-—
onChangeCallback for when date changesfunction(date: Dayjs)-—
onPanelChangeCallback for when panel changesfunction(date: Dayjs, mode: string)-—
onSelectCallback for when a date is selected, include source infofunction(date: Dayjs, info: { source: 'year' | 'month' | 'date' | 'customize' })-info: 5.6.0