Setting SfRecurrenceEditor to Last Day of the Month
Hello, I want to set a recurring task for the LAST day of the month, but the selector only supports specific day numbers. If I set it to the 31st, I do not get events on the months that only have 28, 29, or 30 days.
I believe that RRULE specifications support setting `BYMONTHDAY=-1` which would set the rule to the last day of the month, but I don't know how to access this from the SfRecurrenceEditor component.
Hi Andy Terbovich,
Greetings from Syncfusion Support.
We have reviewed and validated the query you raised
regarding your requirement. Based on the current scheduler design, recurring
events support only specific dates. For example, if the recurrence rule is set
to the 31st, the event will be created only in those months that have a 31st
day. This is the expected and intended behavior of the scheduler.
Don't hesitate to get in touch if you require further help or more information.
Regards,
Vijay
If the backing RRule standards support -1 to indicate last day of the month, why would your expected and intended behavior allows implementation of this standard? This is very frustrating and limiting, especially since other libraries like Telerik support this behavior out of the box. This severely limits the Scheduler's usability in ways that are critical to end users.
You could even just change the input limits from their current setting of 1 to 31 to the actual RRULE standard limits of -31 to +31.
I had to add my own check box marked "Last day of the month" and do a bunch of overrides to rewrite the resulting RRULE as need. This is silly to have to do for such an expensive set of UI tools, especially since your Scheduler/calendar appears to consume and render to the resulting events perfectly.
Hi Andy
Terbovich,
The Syncfusion Blazor Scheduler supports enhanced recurrence pattern handling
through the OnPopupClose event. When a
recurring event is created in the scheduler's editor window, users can now
select the 31st day to automatically generate a recurring series that occurs on
the last day of each month. This is
achieved by interpreting BYMONTHDAY=-1
within the recurrence rule, which identifies the "last day of month"
pattern and applies the appropriate logic when saving the recurrence rule.
Please refer to the attached code snippet and sample for implementation
details.
[Home.razor]
|
<SfSchedule TValue="AppointmentData" Height="650px" @bind-SelectedDate="@CurrentDate"> <ScheduleEvents TValue="AppointmentData" OnPopupClose="OnPopupClose"></ScheduleEvents> <ScheduleEventSettings DataSource="@DataSource"></ScheduleEventSettings> </SfSchedule> @code{ DateTime CurrentDate = new DateTime(2020, 2, 14);
private async Task OnPopupClose(PopupCloseEventArgs<AppointmentData> args) { // Only change BYMONTHDAY=31 to BYMONTHDAY=-1 (last day of month) if (args.Data != null && !string.IsNullOrEmpty(args.Data.RecurrenceRule)) { var rule = args.Data.RecurrenceRule; // Replace BYMONTHDAY=31 with BYMONTHDAY=-1 if (rule.Contains("BYMONTHDAY=31")) { rule = rule.Replace("BYMONTHDAY=31", "BYMONTHDAY=-1"); args.Data.RecurrenceRule = rule; } } await Task.CompletedTask; } } |
Sample link: https://blazorplayground.syncfusion.com/rNBRjdVAhOiytYpa
OnPopupClose API: https://blazor.syncfusion.com/documentation/scheduler/events#onpopupclose
Don't hesitate to get in touch if you require further help or more information.
Regards,
Vijay
- 3 Replies
- 2 Participants
-
AT Andy Terbovich
- Jun 18, 2026 03:34 PM UTC
- Jun 23, 2026 08:36 AM UTC