Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

To activate the duration between startDate and endDate in SfCalendar, you can follow these steps:

  1. Set the startDate and endDate properties of SfCalendar.
calendar.startDate = DateTime.now();
calendar.endDate = DateTime.now().add(Duration(days: 7)); // set end date as 7 days from now
  1. Use a date range to highlight the duration between the startDate and endDate.
calendar.selectionMode = CalendarSelectionMode.range;
calendar.selectedRange = DateRange(calendar.startDate, calendar.endDate);

This will activate the duration between the startDate and endDate in SfCalendar.