initialDisplayDate property
The initial date to show on the SfCalendar.
The SfCalendar will display the dates based on the date set to this property.
Defaults to DateTime(DateTime.now().year, DateTime.now().month, DateTime.now().day, 08, 45, 0)
.
See also:
- CalendarController.displayDate, to change the display date of calendar programmatically on run time.
- CalendarController.forward, to navigate to next view of calendar programmatically.
- CalendarController.backward, to navigate to previous view of calendar Programmatically.
- onViewChanged, the callback which will notify that the current visible dates were changed in calendar.
- initialSelectedDate, to selected date programmatically on calendar initially.
- Knowledge base: How to programmatically navigate to adjacent dates
- Knowledge base: How to programmatically navigate to a date
Widget build(BuildContext context) {
return Container(
child: SfCalendar(
view: CalendarView.week,
initialDisplayDate: DateTime(2020, 02, 05, 10, 0, 0),
),
);
}
Implementation
final DateTime initialDisplayDate;