Create a Repeating Appointment Using the Recurrence Rule in Flutter Event Calendar | Syncfusion Blogs
Live Chat Icon For mobile
Live Chat Icon
Popular Categories.NET  (172).NET Core  (29).NET MAUI  (192)Angular  (107)ASP.NET  (51)ASP.NET Core  (82)ASP.NET MVC  (89)Azure  (40)Black Friday Deal  (1)Blazor  (209)BoldSign  (12)DocIO  (24)Essential JS 2  (106)Essential Studio  (200)File Formats  (63)Flutter  (131)JavaScript  (219)Microsoft  (118)PDF  (80)Python  (1)React  (98)Streamlit  (1)Succinctly series  (131)Syncfusion  (882)TypeScript  (33)Uno Platform  (3)UWP  (4)Vue  (45)Webinar  (49)Windows Forms  (61)WinUI  (68)WPF  (157)Xamarin  (161)XlsIO  (35)Other CategoriesBarcode  (5)BI  (29)Bold BI  (8)Bold Reports  (2)Build conference  (8)Business intelligence  (55)Button  (4)C#  (146)Chart  (125)Cloud  (15)Company  (443)Dashboard  (8)Data Science  (3)Data Validation  (8)DataGrid  (62)Development  (613)Doc  (7)DockingManager  (1)eBook  (99)Enterprise  (22)Entity Framework  (5)Essential Tools  (14)Excel  (37)Extensions  (22)File Manager  (6)Gantt  (18)Gauge  (12)Git  (5)Grid  (31)HTML  (13)Installer  (2)Knockout  (2)Language  (1)LINQPad  (1)Linux  (2)M-Commerce  (1)Metro Studio  (11)Mobile  (488)Mobile MVC  (9)OLAP server  (1)Open source  (1)Orubase  (12)Partners  (21)PDF viewer  (41)Performance  (12)PHP  (2)PivotGrid  (4)Predictive Analytics  (6)Report Server  (3)Reporting  (10)Reporting / Back Office  (11)Rich Text Editor  (12)Road Map  (12)Scheduler  (52)Security  (3)SfDataGrid  (9)Silverlight  (21)Sneak Peek  (31)Solution Services  (4)Spreadsheet  (11)SQL  (10)Stock Chart  (1)Surface  (4)Tablets  (5)Theme  (12)Tips and Tricks  (112)UI  (368)Uncategorized  (68)Unix  (2)User interface  (68)Visual State Manager  (2)Visual Studio  (30)Visual Studio Code  (17)Web  (577)What's new  (313)Windows 8  (19)Windows App  (2)Windows Phone  (15)Windows Phone 7  (9)WinRT  (26)
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!

googleplay.png

Related blogs

Tags:

Share this post:

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

Be the first to get updates

Subscribe RSS feed
Scroll To Top