CalendarDefaults

Functions

Link copied to clipboard
fun borderedCardStyle(cornerRadius: Dp = 8.dp, density: CalendarDensity = CalendarDensity.Expanded, borderWidth: Dp = 1.dp, borderColor: Color = MaterialTheme.colorScheme.outlineVariant, selectedElevation: Dp = 2.dp, colors: CalendarDayColors = dayColors()): CalendarStyle

Bordered-card CalendarStyle for dashboard and desktop grids: rounded-square cells with cornerRadius outlined by a borderWidth border in borderColor, and a selectedElevation shadow under the selected day. Defaults to CalendarDensity.Expanded.

Link copied to clipboard
fun dayColors(containerColor: Color = Color.Transparent, contentColor: Color = MaterialTheme.colorScheme.onSurface, todayContentColor: Color = MaterialTheme.colorScheme.primary, todayIndicatorColor: Color = MaterialTheme.colorScheme.primary, selectedContainerColor: Color = MaterialTheme.colorScheme.primary, selectedContentColor: Color = MaterialTheme.colorScheme.onPrimary, inRangeContainerColor: Color = MaterialTheme.colorScheme.primaryContainer, inRangeContentColor: Color = MaterialTheme.colorScheme.onPrimaryContainer, outDateContentColor: Color = MaterialTheme.colorScheme.onSurfaceVariant.copy(alpha = 0.5f), unavailableContainerColor: Color = Color.Transparent, unavailableContentColor: Color = MaterialTheme.colorScheme.onSurface.copy(alpha = 0.38f), labelColor: Color = MaterialTheme.colorScheme.onSurfaceVariant, holidayLabelColor: Color = MaterialTheme.colorScheme.primary, focusedBorderColor: Color = todayIndicatorColor, hoverContainerColor: Color = contentColor.copy(alpha = 0.08f)): CalendarDayColors
Link copied to clipboard
fun dayShapes(dayShape: Shape = CircleShape, selectedShape: Shape = CircleShape, inRangeShape: Shape = RectangleShape, todayIndicator: TodayIndicator = TodayIndicator.Ring(), focusedBorderWidth: Dp = 2.dp): CalendarDayShapes
Link copied to clipboard
fun dayStrings(rangeStart: String = orreryString(OrreryString.DayRangeStart), rangeEnd: String = orreryString(OrreryString.DayRangeEnd), inRange: String = orreryString(OrreryString.DayInRange), today: String = orreryString(OrreryString.DayToday), unavailable: String = orreryString(OrreryString.DayUnavailable)): CalendarDayStrings

Builds CalendarDayStrings. Defaults are resolved from the current locale's resources; override any parameter to replace a string.

Link copied to clipboard
fun CalendarDefaults.MiniMonth(yearMonth: YearMonth, modifier: Modifier = Modifier, firstDayOfWeek: DayOfWeek = DayOfWeek.MONDAY, today: LocalDate = currentDate(), selection: Selection? = null, dayInfo: (LocalDate) -> DayInfo?? = null)

Default mini-month cell for YearCalendar. today is drawn on a filled primary circle with onPrimary text; dates in selection (the single date, multi dates, and a range from start to end) sit on a subtle primaryContainer pill; day numbers whose dayInfo reports DayInfo.isHoliday use the primary color.

Link copied to clipboard
fun MonthTitle(month: CalendarMonth, modifier: Modifier = Modifier)

Month + year title used by VerticalCalendar's default header.

Link copied to clipboard
fun roundedSquareStyle(cornerRadius: Dp = 10.dp, density: CalendarDensity = CalendarDensity.Comfortable, colors: CalendarDayColors = dayColors()): CalendarStyle

Rounded-square CalendarStyle: day and selection shapes are RoundedCornerShape with cornerRadius, and in-range days keep the continuous connector band.

Link copied to clipboard
fun segmentedRangeStyle(cornerRadius: Dp = 8.dp, density: CalendarDensity = CalendarDensity.Comfortable, colors: CalendarDayColors = dayColors()): CalendarStyle

Segmented-range CalendarStyle: day, selection and in-range shapes are RoundedCornerShape with cornerRadius, so every in-range day gets its own rounded fill instead of a continuous band.

Link copied to clipboard
fun style(density: CalendarDensity = CalendarDensity.Comfortable, colors: CalendarDayColors = dayColors(), shapes: CalendarDayShapes = dayShapes(), cellBorderWidth: Dp = 0.dp, cellBorderColor: Color = Color.Transparent, selectedElevation: Dp = 0.dp): CalendarStyle

Default Material 3 CalendarStyle: circle day and selection shapes with a continuous pill range band, at the given density.

Link copied to clipboard
fun WeekHeader(daysOfWeek: List<DayOfWeek>, modifier: Modifier = Modifier, leadingSpacer: Boolean = false)

Weekday header row with localized short names.

Link copied to clipboard
fun WeekNumber(week: CalendarWeek, modifier: Modifier = Modifier)

ISO week number cell for the leading column.