Customize the schedule view label by using the TimeRulerFormat property in each Schedule view in the WinUI Calendar. XAML Create the WinUI Scheduler and set the ViewType as TimelineDay. <scheduler:SfScheduler x:Name="Schedule" ViewType="TimelineDay"> </scheduler:SfScheduler> XAML Customize the TimelineView label by setting the TimeRulerFormat property of the TimelineViewSettings. <scheduler:SfScheduler.TimelineViewSettings> <scheduler:TimelineViewSettings TimeRulerFormat="hh:mm"> </scheduler:TimelineViewSettings> </scheduler:SfScheduler.TimelineViewSettings> XAML Customize the WeekView, DayView, and WorkWeekView label by setting the TimeRulerFormat property of the DayViewSettings. <scheduler:SfScheduler.DaysViewSettings> <scheduler:DaysViewSettings TimeRulerFormat="hh:mm"> </scheduler:DaysViewSettings> </scheduler:SfScheduler.DaysViewSettings> Take a moment to pursue the documentation. You can also find the options about the Timeline Views.Conclusion I hope you enjoyed learning about how to format the Scheduler view (Calendar) time slot label in WinUI.You can refer to our WinUI Calendar feature tour page to know about its other groundbreaking feature representations and documentation, and how to quickly get started for configuration specifications. You can also explore our WinUI Calendar example to understand how to create and manipulate data.For current customers, you can check out our Document Processing Libraries from the License and Downloads page. If you are new to Syncfusion, you can try our 30-day free trial to check out our controls.If you have any queries or require clarifications, please let us know in the comments section below. You can also contact us through our support forums, Direct-trac, or feedback portal. We are always happy to assist you!
In the Flutter Event Calendar, change the month header format by using the headerDateFormat property. Using the onViewChanged callback, the different header format can be assigned based on the calendar views. child: SfCalendar( view: CalendarView.day, controller: _controller, allowedViews: [ CalendarView.day, CalendarView.week, CalendarView.workWeek, CalendarView.month, CalendarView.timelineDay, CalendarView.timelineWeek, CalendarView.timelineWorkWeek, CalendarView.timelineMonth, CalendarView.schedule ], dataSource: _getCalendarDataSource(), headerDateFormat: _headerFormat, onViewChanged: viewChanged, ) void viewChanged(ViewChangedDetails viewChangedDetails) { if (_controller.view == CalendarView.day) { _headerFormat = 'yyy MMM'; } else if (_controller.view == CalendarView.week || _controller.view == CalendarView.workWeek || _controller.view == CalendarView.timelineDay || _controller.view == CalendarView.timelineMonth) { _headerFormat = 'MMM yyy'; } else if (_controller.view == CalendarView.month) { _headerFormat = 'MMMM yy'; } else if (_controller.view == CalendarView.timelineWeek || _controller.view == CalendarView.timelineWorkWeek) { _headerFormat = 'MMM yy'; } else { _headerFormat = 'yyy'; } SchedulerBinding.instance!.addPostFrameCallback((timeStamp) { setState(() { }); }); } View sample in GitHub
In the Flutter Event Calendar, you can change the time interval, width and height by using the timeInterval properties timeIntervalHeight and timeIntervalWidth in TimeSlotViewSettings. Note:The timeIntervalWidth property is only applicable for timeline day, week, work week, month views. The timeIntervalHeight property is only applicable for day, week, work week views. import 'package:flutter/material.dart'; import 'package:syncfusion_flutter_calendar/calendar.dart'; void main() { return runApp(TimeInterval()); } class TimeInterval extends StatelessWidget { @override Widget build(BuildContext context) { return MaterialApp( debugShowCheckedModeBanner: false, home: Scaffold( body: SafeArea( child: SfCalendar( view: CalendarView.day, allowedViews: [ CalendarView.day, CalendarView.week, CalendarView.workWeek, CalendarView.timelineDay, CalendarView.timelineWeek, CalendarView.timelineWorkWeek, CalendarView.timelineMonth ], dataSource: _getCalendarDataSource(), timeSlotViewSettings: TimeSlotViewSettings( timeInterval: Duration(hours: 2), timeIntervalHeight: 80, timeIntervalWidth: 100), ), )), ); } _AppointmentDataSource _getCalendarDataSource() { List<Appointment> appointments = <Appointment>[]; appointments.add(Appointment( startTime: DateTime(2021, 1, 25, 04, 0, 0), endTime: DateTime(2021, 1, 25, 05, 0, 0), subject: 'Meeting', color: Colors.blue, )); appointments.add(Appointment( startTime: DateTime(2021, 1, 26, 01, 0, 0), endTime: DateTime(2021, 1, 26, 03, 0, 0), subject: 'Planning', color: Colors.green, )); return _AppointmentDataSource(appointments); } } class _AppointmentDataSource extends CalendarDataSource { _AppointmentDataSource(List<Appointment> source) { appointments = source; } } View sample in GitHub
In the Flutter Event Calendar, you can format the view header date and day by using the dayFormat and dateFormat properties in TimeSlotViewSettings. Inside the state initialize the default values for calendar. final CalendarController _controller = CalendarController(); String _dayFormat = 'EEE', _dateFormat = 'dd'; CalendarDataSource? _dataSource; @override initState() { _dataSource = _getCalendarDataSource(); super.initState(); } Using onViewChanged callback get the current calendar view, based on the calendar views, set the dayFormat and dateFormat. void viewChanged(ViewChangedDetails viewChangedDetails) { if (_controller.view == CalendarView.day) { SchedulerBinding.instance!.addPostFrameCallback((Duration duration) { if (_dayFormat != 'EEEEE' || _dateFormat != 'dd') { setState(() { _dayFormat = 'EEEEE'; _dateFormat = 'dd'; }); } else { return; } }); } else { SchedulerBinding.instance!.addPostFrameCallback((Duration duration) { if (_dayFormat != 'EEE' || _dateFormat != 'dd') { setState(() { _dayFormat = 'EEE'; _dateFormat = 'dd'; }); } else { return; } }); } } Assign _dayFormat and _dateFormat values to the calendar. child: SfCalendar( view: CalendarView.week, allowedViews: [ CalendarView.day, CalendarView.week, CalendarView.workWeek ], controller: _controller, dataSource: _dataSource, timeSlotViewSettings: TimeSlotViewSettings( dateFormat: _dateFormat, dayFormat: _dayFormat), onViewChanged: viewChanged, ), View sample in GitHub Day view Week view Work week view ConclusionI hope you enjoyed learning about how to format the view header day and date in the Flutter Calendar.You can refer to our Flutter Calender feature tour page to know about its other groundbreaking feature representations. You can also explore our Flutter Calendar documentation to understand how to create and manipulate data.For current customers, you can check out our components from the License and Downloads page. If you are new to Syncfusion®, you can try our 30-day free trial to check out our other controls.If you have any queries or require clarifications, please let us know in the comments section below. You can also contact us through our support forums, Direct-Trac, or feedback portal. We are always happy to assist you!
In the Flutter Event Calendar, you can customize the height of the appointments in timeline views using timelineAppointmentHeight property of the TimeSlotViewSettings. By using the timelineAppointmentHeight property to change the appointment height in timeline views. child: SfCalendar( view:CalendarView.timelineDay, allowedViews: [ CalendarView.timelineDay, CalendarView.timelineWeek, CalendarView.timelineWorkWeek, CalendarView.timelineMonth ], timeSlotViewSettings: TimeSlotViewSettings(timelineAppointmentHeight: 300), dataSource: _getCalendarDataSource(), ), _AppointmentDataSource _getCalendarDataSource() { List<Appointment> appointments = <Appointment>[]; appointments.add(Appointment( startTime: DateTime.now(), endTime: DateTime.now().add(Duration(hours: 2)), subject: 'Meeting', color: Colors.teal, )); return _AppointmentDataSource(appointments); } View sample in GitHub
In the Flutter Event Calendar, you can customize the cell borders by using the cellBorderColor property of the calendar. By using the cellBorderColor property, you can customize the vertical and horizontal line colors. child: SfCalendar( view: CalendarView.day, allowedViews: <CalendarView>[ CalendarView.day, CalendarView.week, CalendarView.workWeek, CalendarView.month, CalendarView.timelineDay, CalendarView.timelineWeek, CalendarView.timelineWorkWeek, CalendarView.timelineMonth, ], cellBorderColor: Colors.teal, ), View sample in GitHub ConclusionI hope you enjoyed learning about how to customize the cell border in the Flutter Calendar.You can refer to our Flutter Calendar feature tour page to know about its other groundbreaking feature representations. You can also explore our Flutter Calendar documentation to understand how to create and manipulate data.For current customers, you can check out our components from the License and Downloads page. If you are new to Syncfusion®, you can try our 30-day free trial to check out our other controls.If you have any queries or require clarifications, please let us know in the comments section below. You can also contact us through our support forums, Direct-Trac, or feedback portal. We are always happy to assist you!
In Flutter Event Calendar, you can navigate between the calendar views using the view property of Calendar and in this article, switching between event calendar view has been achieved using the allowedViews property of the calendar. STEP 1: Inside the state initialize the default values. final CalendarController _controller = CalendarController(); Color? _headerColor, _viewHeaderColor, _calendarColor; STEP 2: Place the event calendar to the body of the Scaffold widget. body: SfCalendar( view: CalendarView.week, allowedViews: [ CalendarView.day, CalendarView.week, CalendarView.workWeek, CalendarView.month, CalendarView.timelineDay, CalendarView.timelineWeek, CalendarView.timelineWorkWeek ], viewHeaderStyle: ViewHeaderStyle(backgroundColor: viewHeaderColor), backgroundColor: calendarColor, controller: _controller, initialDisplayDate: DateTime.now(), dataSource: getCalendarDataSource(), onTap: calendarTapped, monthViewSettings: MonthViewSettings( navigationDirection: MonthNavigationDirection.vertical), ), Note:addPostFrameCallback will be called after the widget build() is completed. STEP 3: Using the OnTap event, you will get the targetElement (get details about the tapped element). By this, you can move to the calendar view using selected date of the calendar. void calendarTapped(CalendarTapDetails calendarTapDetails) { if (_controller.view == CalendarView.month && calendarTapDetails.targetElement == CalendarElement.calendarCell) { _controller.view = CalendarView.day; } else if ((_controller.view == CalendarView.week || _controller.view == CalendarView.workWeek) && calendarTapDetails.targetElement == CalendarElement.viewHeader) { _controller.view = CalendarView.day; }} View sample in GitHub ConclusionI hope you enjoyed learning about how to switch between views in the Flutter SfCalendar.You can refer to our Flutter SfCalendar featuretour page to know about its other groundbreaking feature representations and documentation, and how to quickly get started for configuration specifications. You can also explore our Flutter SfCalendar demo to understand how to create and manipulate data.For current customers, you can check out our components from the License and Downloads page. If you are new to Syncfusion®, you can try our 30-day free trial to check out our other controls.If you have any queries or require clarifications, please let us know in the comments section below. You can also contact us through our support forums, Direct-Trac, or feedback portal. We are always happy to assist you!