Live Chat Icon For mobile
Live Chat Icon
Popular Categories.NET  (161).NET Core  (29).NET MAUI  (64)Angular  (74)ASP.NET  (50)ASP.NET Core  (79)ASP.NET MVC  (88)Azure  (36)Blazor  (153)DocIO  (23)Essential JS 2  (86)Essential Studio  (174)File Formats  (29)Flutter  (123)JavaScript  (187)Microsoft  (113)PDF  (67)React  (62)Succinctly series  (128)Syncfusion  (611)TypeScript  (32)Uno Platform  (3)UWP  (4)Vue  (40)Webinar  (35)Windows Forms  (59)WinUI  (52)WPF  (138)Xamarin  (156)XlsIO  (25)Other CategoriesBarcode  (5)BI  (29)Bold BI  (5)Build conference  (6)Business intelligence  (54)Button  (4)C#  (120)Chart  (57)Cloud  (12)Company  (445)Dashboard  (8)Data Science  (3)Data Validation  (6)DataGrid  (55)Development  (402)Doc  (7)DockingManager  (1)eBook  (96)Enterprise  (22)Entity Framework  (5)Essential Tools  (14)Excel  (23)Extensions  (18)File Manager  (4)Gantt  (11)Gauge  (11)Git  (4)Grid  (28)HTML  (11)Installer  (2)Knockout  (2)Language  (1)LINQPad  (1)Linux  (2)M-Commerce  (1)Metro Studio  (11)Mobile  (313)Mobile MVC  (9)OLAP server  (1)Open source  (1)Orubase  (12)Partners  (21)PDF viewer  (30)Performance  (9)PHP  (1)PivotGrid  (4)Predictive Analytics  (6)Report Server  (3)Reporting  (10)Reporting / Back Office  (11)Rich Text Editor  (7)Road Map  (10)Scheduler  (36)SfDataGrid  (9)Silverlight  (21)Sneak Peek  (23)Solution Services  (3)Spreadsheet  (11)SQL  (8)Stock Chart  (1)Surface  (4)Tablets  (5)Theme  (11)Tips and Tricks  (92)UI  (225)Uncategorized  (68)Unix  (2)User interface  (68)Visual State Manager  (2)Visual Studio  (23)Visual Studio Code  (17)Web  (377)What's new  (213)Windows 8  (19)Windows App  (2)Windows Phone  (15)Windows Phone 7  (9)WinRT  (26)
Share on twitter
Share on facebook
Share on linkedin
Create a Repeating Appointment Using the Recurrence Rule in Flutter Event Calendar

Create a Repeating Appointment Using the Recurrence Rule in Flutter Event Calendar

A recurring appointment or event repeats at a regular interval. For example, weekly classes or daily scrum meetings.

Our Syncfusion Flutter event Calendar provides basic functionalities for scheduling, managing, and representing appointments efficiently. It also provides support to create recurring appointments. This feature removes multiple instances of the same repeating appointments in the data source. Thus, it helps to enhance our productivity.

By setting the frequency of appointments with a recurrence rule, we can easily add those repeating events to the Flutter Calendar. Then, we can add other basic details like the start and end times, subject, and location.

In this blog, we’ll see how to use the recurrence rule feature in the Flutter event Calendar to create recurring appointments.

Note: If you are new to our Flutter Calendar, then please read the Getting Started with Flutter Calendar documentation before proceeding.

Recurrence rule

The recurrence rule specifies the pattern for an appointment’s occurrence. This pattern defines:

  • Recurrence type—defines the type of recurrence like daily, weekly, monthly, or yearly.
  • Recurrence range—defines the occurrence end details of a recurring appointment like count, end date (until), and no end date (never ending).
  • Interval—defines the interval between the occurrences of a recurring appointment.
  • Recurrence details—defines the day, weekday, month, and position for the occurrence of a recurring appointment.

The appointments will repeat based on the frequency type specified in the recurrence rule.

Refer to the following table.

Property NamePurpose
FREQMaintains the repeat type value of an appointment (daily, weekly, monthly, yearly).

Example: FREQ=DAILY;INTERVAL=1

INTERVALMaintains the interval value of the appointments.

Example: To create an appointment for every day, we need to set the following:

FREQ=DAILY;INTERVAL=1

COUNTSpecifies the recurrence range of an appointment and maintains the count value or occurrence count of the appointment.

For example: To create an appointment that repeats every 10 days, we need to set the following:

FREQ=DAILY;INTERVAL=1;COUNT=10

UNTILSpecifies the recurrence range and maintains the occurrence end date value of the appointment.

For example: To create a daily appointment that will repeat until 6/30/2020, set the following:

FREQ=DAILY;INTERVAL=1;UNTIL=20200630T183000Z

BYDAYSpecifies the recurrence detail to maintain the appointment occurrence day of the week (Monday/Tuesday/Wednesday/Thursday/Friday/Saturday/Sunday). Note: Not applicable for daily recurrence types.

For example: To create an appointment that will repeat on Monday and Wednesday of a week, set the following:

FREQ=WEEKLY;INTERVAL=1;BYDAY=MO,WE;COUNT=10

BYMONTHDAYSpecifies the recurrence details to maintain the appointment occurrence day of the month. Note: Not applicable for daily and weekly recurrence types.

For example: To create an appointment that will repeat on the third day of each month, set the following:

Example: FREQ=MONTHLY;BYMONTHDAY=3;INTERVAL=1;COUNT=10

BYMONTHSpecifies the recurrence details to maintain the occurrence month of the appointment. Note: Only applicable for yearly recurrence types.

For example: To create an appointment that will repeat on the third of June every year, set the following: FREQ=YEARLY;BYMONTHDAY=3;BYMONTH=6;INTERVAL=1;COUNT=10

BYSETPOSSpecifies the recurrence details to maintain the week number of the month of an appointment. Note: Not applicable for daily and weekly recurrence types.

If it maintains a -1 value, then it denotes the last week of the month. The -2 value denotes the second to last week of the month.

For example: To create an appointment that will repeat on the second Monday of a month, set the following: FREQ=MONTHLY;BYDAY=MO;BYSETPOS=2;UNTIL=20200810T183000Z .

Refer to the following code example.

 final Appointment dailyMeeting = Appointment(
        startTime: DateTime(2019, 01, 01, 09),
        endTime: DateTime(2019, 01, 01, 10),
        subject: ‘Daily recurring meeting’,
        color: Colors.blue,
        recurrenceRule: “FREQ=DAILY;INTERVAL=1;COUNT=10”);
Daily Recurring Appointments in Flutter Event Calendar
Daily Recurring Appointments in Flutter Event Calendar

Note: For more details, refer to the Recurrence appointment in Flutter Event Calendar documentation.

Recurrence exception

The Flutter Calendar supports recurrence exceptions to remove an occurrence of an appointment. This feature also enables us to adjust the date, time, and other details of the recurring appointment series.

For some situations, like holidays, we might change or delete the occurrence of an appointment. This is known as an exception appointment from the series.

We can easily remove an occurrence of a repeating appointment on specific dates using the RecurrenceExceptionDates property.

Refer to the following code example.

DateTime exceptionDate = DateTime(2019, 12, 20);
  final Appointment dailyAppointment = appointments.add(Appointment(
      startTime: DateTime(2019, 12, 16, 10),
      endTime: DateTime(2019, 12, 16, 12),
      subject: ‘Occurs daily’,
      color: Colors.red,
      recurrenceRule: ‘FREQ=DAILY;COUNT=20’,
      recurrenceExceptionDates: <DateTime>[exceptionDate]));
Deleting an Appointment from the Recurring Series in Flutter Event Calendar
Deleting an Appointment from the Recurring Series in Flutter Event Calendar

Also, we can change the occurrence of a repeating appointment on any specific date without removing it. To do so, use the recurrenceExceptionDates and recurrenceId properties of the appointment.

The recurrenceId of the changed occurrence should hold the exact recurrence appointment ID.

Refer to the following code example.

Final DateTime exceptionDate = DateTime((2021, 04, 14);

  final Appointment recurrenceAppointment = Appointment(
      startTime: DateTime(2021, 04, 12, 10),
      endTime: DateTime(2021, 04, 12, 12),
      subject: ‘Daily scrum meeting’,
      id: ‘01’,
       ecurrenceRule: ‘FREQ=DAILY;INTERVAL=1;COUNT=10’,
      color: Colors.lightGreen,
      recurrenceExceptionDates: <DateTime>[exceptionDate],
    );

  final Appointment exceptionAppointment = Appointment(
        recurrenceId: 01,
        startTime: DateTime(2021, 04, 14, 13),
        endTime: DateTime(2021, 04, 14, 14),
        subject: ‘Scrum meeting – Changed Occurrence’,
        color: Colors.greenAccent);
Changing the Occurrence Details of a Recurring Appointment in Flutter Event Calendar
Changing the Occurrence Details of a Recurring Appointment in Flutter Event Calendar

Note: For more details, refer to the Recurrence pattern exceptions in Flutter Event Calendar documentation.

GitHub reference

Also, check out the example for creating repeating appointments with the recurrence rule in Flutter Calendar on GitHub.

Conclusion

Thanks for reading! In this blog, we have seen how to create a recurring appointment by setting the recurrence rule in the Flutter event Calendar widget. With this, you can easily create and manage your repeating appointments and enhance your productivity.

Explore our Flutter Calendar documentation and GitHub demos to learn about other user-friendly features. Please share your feedback in the comments section below!

Also, you can contact us through our support forumsupport portal, or feedback portal. As always, we are happy to assist you!

Related blogs

Tags:

Share this post:

Share on twitter
Share on facebook
Share on linkedin

Comments (1)

Synfusion isn’t scalable, We are paying a lot of money for this plugin only for Support that doesn’t even know how to resolve our issue.

Comments are closed.

Popular Now

Be the first to get updates

Subscribe RSS feed
Scroll To Top