timeSlotViewSettings property
The settings have properties which allow to customize the time slot views of the SfCalendar.
Allows to customize the TimeSlotViewSettings.startHour, TimeSlotViewSettings.endHour, TimeSlotViewSettings.nonWorkingDays, TimeSlotViewSettings.timeInterval, TimeSlotViewSettings.timeIntervalHeight, TimeSlotViewSettings.timeIntervalWidth, TimeSlotViewSettings.timeFormat, TimeSlotViewSettings.dateFormat, TimeSlotViewSettings.dayFormat, and TimeSlotViewSettings.timeRulerSize in time slot views of calendar.
See also:
- monthViewSettings, to know more about the customization options for the month view of calendar.
- TimeSlotViewSettings, to know more about the customization options for the month view of calendar.
- scheduleViewSettings, to know more about the customization options for the schedule view of calendar.
- specialRegions, which allows to customize particular time region in the time slot views of calendar.
- Knowledge base: How to customize time label
- Knowledge base: How to change the time interval width and height
- Knowledge base: How to set the arbitrary height to an appointment
- Knowledge base: How to auto fit the calendar to screen height
- Knowledge base: How to customize the timeline appointment height
- Knowledge base: How to change working days and 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 TimeSlotViewSettings timeSlotViewSettings;