timeFormat property
Formats for the time text in the time slot views of SfCalendar.
Defaults to h a
.
See also:
- timeTextStyle, which is the text style for the time text in the timeslot views of calendar.
- timeRulerSize, which is the size for the time ruler, which displays the time label in timeslot views of calendar.
- timeInterval, which is the duration of every single timeslot in the timeslot views of calendar.
- startHour, which is the start hour for the timeslot views of the calendar.
- endHour, which is the end hour for the timeslot view of the calendar.
- dayFormat, which is the format for the day text in view header view of the timeslot views in calendar.
- dateFormat, which is the format for the date text in the view header view of the timeslot 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 format the view header day and date format
- Knowledge base: How to format the date and time in timeline views
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 String timeFormat;