[PR #1855] [MERGED] New Property - RadzenMultiDayView->AdvanceDays #2932

Closed
opened 2026-01-29 18:21:10 +00:00 by claunia · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/radzenhq/radzen-blazor/pull/1855
Author: @paulo-rico
Created: 12/15/2024
Status: Merged
Merged: 12/17/2024
Merged by: @akorchev

Base: masterHead: master


📝 Commits (1)

  • 2933951 New Property - RadzenMultiDayView->AdvanceDays

📊 Changes

3 files changed (+31 additions, -8 deletions)

View changed files

📝 Radzen.Blazor/RadzenMultiDayView.razor.cs (+18 -4)
📝 Radzen.Blazor/Rendering/DaySlotEvents.razor (+2 -2)
📝 RadzenBlazorDemos/Pages/SchedulerMultiDay.razor (+11 -2)

📄 Description

Rather than hardcoding how many days this view will Advance or Retract, currently set to equal the NumberOfDays displayed, this is a new property that allows you to set it explicitly.

Additional changes

  • There were some errors I made in the comments for DaySlotEvents. Now rectified.
  • When NumberOfDays slider is changed, it will call StateHasChanged() rather than reloading the Schedule (see notes below)

NOTES (let me know if you want me to raise issues for these)

Everything about the RadzenScheduler updates fine, with the exception of the title. This can be highlighted on the demo with the year views. Selecting a new StartMonth using the RadzenSelectBar updates all but the title. If January is selected, it should just show the current year. Any other month will show from and to. If you switch between, you will see that the title is one step behind, i.e.

  1. Select another month (this should now show a from and to. It doesn't)
  2. Select January (this should now just show the current year. It doesn't)
  3. Select another month (this should now show a from and to). It now shows just the current year)

Would address it but I've not been successful in my attempts. Been getting out of memory errors. Obviously, my attempts at inserting StateHasChanged in certain places has caused some sort of infinite loop!

For the NumberOfDays slider, I call StateHasChanged on the Change event to rectify this. Sure that this shouldn't be required and be part of the component.

Also, for the life in me, I couldn't get the Change event working on the RadzenSelectBar. May need looking into (the demo page has a section "Get and Set the value of SelectBar using Value and Change event" that doesn't seem to demonstrate this).

Regards
Paul


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/radzenhq/radzen-blazor/pull/1855 **Author:** [@paulo-rico](https://github.com/paulo-rico) **Created:** 12/15/2024 **Status:** ✅ Merged **Merged:** 12/17/2024 **Merged by:** [@akorchev](https://github.com/akorchev) **Base:** `master` ← **Head:** `master` --- ### 📝 Commits (1) - [`2933951`](https://github.com/radzenhq/radzen-blazor/commit/2933951005c9a19309f2e7660f17b5fb21444165) New Property - RadzenMultiDayView->AdvanceDays ### 📊 Changes **3 files changed** (+31 additions, -8 deletions) <details> <summary>View changed files</summary> 📝 `Radzen.Blazor/RadzenMultiDayView.razor.cs` (+18 -4) 📝 `Radzen.Blazor/Rendering/DaySlotEvents.razor` (+2 -2) 📝 `RadzenBlazorDemos/Pages/SchedulerMultiDay.razor` (+11 -2) </details> ### 📄 Description Rather than hardcoding how many days this view will Advance or Retract, currently set to equal the `NumberOfDays` displayed, this is a new property that allows you to set it explicitly. Additional changes - There were some errors I made in the comments for `DaySlotEvents`. Now rectified. - When `NumberOfDays` slider is changed, it will call `StateHasChanged()` rather than reloading the Schedule (see notes below) NOTES (let me know if you want me to raise issues for these) Everything about the `RadzenScheduler` updates fine, with the exception of the title. This can be highlighted on the demo with the year views. Selecting a new `StartMonth` using the `RadzenSelectBar` updates all but the title. If January is selected, it should just show the current year. Any other month will show from and to. If you switch between, you will see that the title is one step behind, i.e. 1. Select another month (this should now show a from and to. It doesn't) 2. Select January (this should now just show the current year. It doesn't) 3. Select another month (this should now show a from and to). It now shows just the current year) Would address it but I've not been successful in my attempts. Been getting out of memory errors. Obviously, my attempts at inserting `StateHasChanged` in certain places has caused some sort of infinite loop! For the `NumberOfDays` slider, I call `StateHasChanged` on the `Change` event to rectify this. Sure that this shouldn't be required and be part of the component. Also, for the life in me, I couldn't get the `Change` event working on the `RadzenSelectBar`. May need looking into (the demo page has a section _"Get and Set the value of SelectBar using Value and Change event"_ that doesn't seem to demonstrate this). Regards Paul --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
claunia added the pull-request label 2026-01-29 18:21:10 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/radzen-blazor#2932