RadzenDatePicker poor rendering performance using Max & Min #619

Closed
opened 2026-01-29 17:40:21 +00:00 by claunia · 1 comment
Owner

Originally created by @Avenged on GitHub (Nov 4, 2022).

Describe the bug
RadzenDatePicker has poor rendering performance when using Max & Min properties to limit the range of the dates. We had to change to common html input dates because RadzenDatePicker takes a long time to render.

To Reproduce

<RadzenDatePicker DateFormat="d"
                                 Max="@(tramitesModel.CreateDateUntil ?? DateTime.Today)"
                                 ShowUpDown="false"
                                 DateRender=@DateRenderSpecial
                                 @bind-Value="tramitesModel.CreateDateFrom" />

<RadzenDatePicker DateFormat="d"
                                 Max="DateTime.Today"
                                 Min="@(tramitesModel.CreateDateFrom ?? DateTime.MinValue)"
                                 ShowUpDown="false"
                                 DateRender=@DateRenderSpecial
                                 @bind-Value="tramitesModel.CreateDateUntil" />

@code {
    public class TramitesModel
    {
         public DateTime? CreateDateFrom { get; set; }
         public DateTime? CreateDateUntil { get; set; }
    }

    public TramitesModel tramitesModel { get; set; } = new();
}

Radzen.Blazor 4.1.8
Google Chrome 107.0.5304.88 (Build oficial) (64 bits)
.NET 6.0
Windows 10 (64 bits)
Visual Studio 2022 17.3.6 (64 bits)

Originally created by @Avenged on GitHub (Nov 4, 2022). <!-- IMPORTANT: Read this first!!! 1. If you own a Radzen Professional or Еnterprise subscription you can report your issue or ask us a question via email at info@radzen.com. Radzen staff will reply within 24 hours (Professional) or 16 hours (Enterprise) 2. The Radzen staff guarantees a response to issues in this repo only to paid subscribers. 3. If you have a HOW TO question start a new forum thread in the Radzen Community forum: https://forum.radzen.com. Radzen staff will close issues that are HOWTO questions. 4. Please adhere to the issue template. Specify all the steps required to reproduce the issue or link a project which reproduces it easily (without requiring extra steps such as restoring a database). --> **Describe the bug** RadzenDatePicker has poor rendering performance when using Max & Min properties to limit the range of the dates. We had to change to common html input dates because RadzenDatePicker takes a long time to render. **To Reproduce** ``` <RadzenDatePicker DateFormat="d" Max="@(tramitesModel.CreateDateUntil ?? DateTime.Today)" ShowUpDown="false" DateRender=@DateRenderSpecial @bind-Value="tramitesModel.CreateDateFrom" /> <RadzenDatePicker DateFormat="d" Max="DateTime.Today" Min="@(tramitesModel.CreateDateFrom ?? DateTime.MinValue)" ShowUpDown="false" DateRender=@DateRenderSpecial @bind-Value="tramitesModel.CreateDateUntil" /> @code { public class TramitesModel { public DateTime? CreateDateFrom { get; set; } public DateTime? CreateDateUntil { get; set; } } public TramitesModel tramitesModel { get; set; } = new(); } ``` Radzen.Blazor 4.1.8 Google Chrome 107.0.5304.88 (Build oficial) (64 bits) .NET 6.0 Windows 10 (64 bits) Visual Studio 2022 17.3.6 (64 bits)
Author
Owner

@enchev commented on GitHub (Nov 4, 2022):

Hey @Avenged,

This code cannot be complied and there are properties like ShowUpDown that are not available for RadzenDatePicker. Not sure also why you use DateTime.MinValue (which is 1), this will lead to 2000+ items in the year dropdown of the picker. You might need to revise your date range.

@enchev commented on GitHub (Nov 4, 2022): Hey @Avenged, This code cannot be complied and there are properties like ShowUpDown that are not available for RadzenDatePicker. Not sure also why you use DateTime.MinValue (which is 1), this will lead to 2000+ items in the year dropdown of the picker. You might need to revise your date range.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/radzen-blazor#619