DaySchedule

fun <T> DaySchedule(events: (LocalDate) -> List<CalendarEvent<T>>, modifier: Modifier = Modifier, state: ScheduleState = rememberScheduleState(), today: LocalDate = currentDate(), currentTime: LocalTime? = null, userScrollEnabled: Boolean = true, zoomGesturesEnabled: Boolean = true, showHalfHourLines: Boolean = false, minEventDurationMinutes: Int = 15, colors: ScheduleColors = ScheduleDefaults.colors(), dimensions: ScheduleDimensions = ScheduleDefaults.dimensions(), strings: ScheduleStrings = ScheduleDefaults.strings(), onEventClick: (CalendarEvent<T>) -> Unit? = null, onEmptySlotClick: (LocalDate, LocalTime) -> Unit? = null, dayHeader: @Composable (LocalDate, Boolean) -> Unit? = { date, isToday -> ScheduleDefaults.DayHeader(date, isToday, colors) }, allDayEventContent: @Composable (CalendarEvent<T>) -> Unit = { event -> ScheduleDefaults.AllDayEventChip(event, colors, dimensions, onClick = onEventClick?.let { cb -> { cb(event) } }) }, hourLabel: @Composable (Int) -> Unit = { hour -> ScheduleDefaults.HourLabel(hour, colors) }, nowIndicator: @Composable () -> Unit = { ScheduleDefaults.NowIndicator(colors, dimensions, contentDescription = strings.nowLabel) }, eventContent: @Composable BoxScope.(PositionedEvent<T>) -> Unit = { positioned -> ScheduleDefaults.EventTile( positioned = positioned, colors = colors, dimensions = dimensions, onClick = onEventClick?.let { cb -> { cb(positioned.event) } }, ) })

Horizontally paged single-day 24-hour schedule view with an optional all-day banner. Swiping moves one day; state holds the visible date, the shared vertical scroll and the zoomable hour height.

Parameters

events

Events for a date; called for each visible day, so index them up front (for example with eventsByDate).

currentTime

Draws nowIndicator on today's column when non-null. Pass it from your own clock so the view stays deterministic in tests.

userScrollEnabled

Whether swiping between days is enabled. The time grid always scrolls vertically.

zoomGesturesEnabled

Whether a two-finger pinch changes ScheduleState.hourHeight.

onEmptySlotClick

Called with the column's date and the tapped time, floored to the hour (to the half hour when showHalfHourLines is true).