startHour property
The start hour for the time slot views in SfCalendar.
Allows to change the start hour for the time slot views in calendar, every day in time slot view start from the hour set to this property.
Defaults to 0
.
See more:
- endHour, which is the end hour for the time slot views in calendar.
- TimeRegion, which allows to customize the particular time region in the timeslot views of calendar.
- nonWorkingDays, which restricts the rendering of mentioned week days, in the CalendarView.workWeek and CalendarView.timelineWorkWeek views of calendar.
- Knowledge base: How to change working days and hours
- Knowledge base: How to highlight working and non working hours
Widget build(BuildContext context) {
return Container(
child: SfCalendar(
view: CalendarView.workWeek,
timeSlotViewSettings: TimeSlotViewSettings(
startHour: 10,
endHour: 20,
nonWorkingDays: <int>[
DateTime.saturday,
DateTime.sunday,
DateTime.friday
],
timeInterval: Duration(minutes: 120),
timeIntervalHeight: 80,
timeFormat: 'h:mm',
dateFormat: 'd',
dayFormat: 'EEE',
timeRulerSize: 70),
),
);
}
Implementation
final double startHour;