Calendar

The Calendar widget displays a calendar for selecting dates or date ranges. It is highly customizable, allowing for different formats, styles, and selection modes.

General Properties

Property
Description

firstDay / lastDay

The first and last dates that can be selected in the calendar.

focusedDay

The date that is initially focused when the calendar is displayed.

currentDay

The current date, which is often highlighted.

calendarFormat

The format of the calendar (month, twoWeeks, week).

rangeSelectionMode

The selection mode (singleDate, range).

headersVisible

If true, the header with the month and year will be visible.

daysOfWeekVisible

If true, the row with the days of the week will be visible.

rowHeight

The height of each row in the calendar.

daysOfWeekHeight

The height of the days of the week row.

startingDayOfWeek

The day of the week to start the calendar with (sunday, monday, etc.).

pageJumpingEnabled

If true, allows the user to jump to a specific month or year.

shouldFillViewport

If true, the calendar will fill the entire viewport.

weekNumbersVisible

If true, week numbers will be displayed.

Header Style Properties

Property
Description

titleCentered

If true, the header title will be centered.

titleTextStyle

The TextStyle for the header title.

headerPadding

The padding around the header.

leftChevronPadding / rightChevronPadding

The padding around the chevron icons for navigating between months.

shape

The shape of the header.

Days of Week Style Properties

Property
Description

weekdayStyle

The TextStyle for the weekday labels.

weekendStyle

The TextStyle for the weekend labels.

shape

The shape of the days of the week row.

Calendar Style Properties

Property
Description

rangeHighlightScale

The scale of the highlight for a selected date range.

rangeHighlightColor

The color of the highlight for a selected date range.

outsideDaysVisible

If true, days from the previous and next months will be visible.

isTodayHighlighted

If true, the current date will be highlighted.

tableBorderColor / tableBorderWidth

The color and width of the border around the calendar table.

tablePadding

The padding around the calendar table.


Default Properties

The Calendar widget supports the following section of Default Properties:

Layout

  • width

  • height

  • padding

  • margin

  • align

Last updated