danheron/Heron.MudCalendar

ItemChange Validation (Enhancement request)

Opened this issue · 0 comments

I was wondering if you would consider extending the API to include a validation call for (1) approving an event change and (2) selectively controlling what events can be moved [via drag & drop]. Two example cases would be:

  1. I would like to keep a user from dragging a future appointment to the past!
  2. I would like to make some appointments unmovable while let other remain editable. This would be in cases where viewing the calendars for a team and the current user is only allowed to control their own events and not the events of the other teammembers.

I think you could accomplish both using a parameter such as Func<CalendarItemChangeRequest, Task> where the CalendarItemChangeRequest contains the current CalendarItem and the proposed changes (new Start, End, AllDay). This call would then return true or false based on if the requested transition should be allowed or not.

Thanks for your consideration!