Error with filtering Appointments for RadzenScheduler #1637

Closed
opened 2026-01-29 17:56:34 +00:00 by claunia · 0 comments
Owner

Originally created by @paulo-rico on GitHub (Feb 21, 2025).

Appointments that do not fall completely within a views range are excluded.

This can be viewed on the demo site. If you look at Month View, there is a "Work from home" appointment 10 days ago. If you try and view this in day view, it is missing.

I've checked the code in Scheduler.GetAppointmentsInRange and it looks like the Where clause will only fetch as described.

            appointments = resourceFilterData.AsQueryable()
                               .Where(
                                new FilterDescriptor[] {
                                    new FilterDescriptor
                                    {
                                       Property = StartProperty,
                                       FilterValue = start,
                                       FilterOperator = FilterOperator.GreaterThanOrEquals
                                    },
                                    new FilterDescriptor
                                    {
                                       Property = EndProperty,
                                       FilterValue = end,
                                       FilterOperator = FilterOperator.LessThanOrEquals
                                    }
                                }, LogicalFilterOperator.And, FilterCaseSensitivity.Default)
                               .ToList()
                               .Select(item => new AppointmentData { Start = startGetter(item), End = endGetter(item), Text = textGetter(item), Data = item });

It should also fetch
AppointmentStart < start && AppointmentEnd >= start && AppointmentEnd <= end
and also
AppointmentEnd > end && AppointmentStart >= start && AppointmentStart <= end

Originally created by @paulo-rico on GitHub (Feb 21, 2025). Appointments that do not fall completely within a views range are excluded. This can be viewed on the demo site. If you look at Month View, there is a "Work from home" appointment 10 days ago. If you try and view this in day view, it is missing. I've checked the code in `Scheduler.GetAppointmentsInRange` and it looks like the Where clause will only fetch as described. ``` appointments = resourceFilterData.AsQueryable() .Where( new FilterDescriptor[] { new FilterDescriptor { Property = StartProperty, FilterValue = start, FilterOperator = FilterOperator.GreaterThanOrEquals }, new FilterDescriptor { Property = EndProperty, FilterValue = end, FilterOperator = FilterOperator.LessThanOrEquals } }, LogicalFilterOperator.And, FilterCaseSensitivity.Default) .ToList() .Select(item => new AppointmentData { Start = startGetter(item), End = endGetter(item), Text = textGetter(item), Data = item }); ``` It should also fetch `AppointmentStart` < `start` && `AppointmentEnd` >= `start` && AppointmentEnd <= end and also `AppointmentEnd` > `end` && `AppointmentStart` >= `start` && AppointmentStart <= end
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/radzen-blazor#1637