Select theme:
Radzen Blazor Studio has replaced Radzen as the primary RAD tool for Blazor applications.
Radzen Blazor Studio offers a modern UI, enhanced features, and improved performance to streamline your development process.
The latest documentation for Radzen Blazor Studio is available here: https://www.radzen.com/blazor-studio/documentation/
Open Radzen Blazor Studio docsThis guide shows how to use two DatePicker components to filter DataGrid by date range.
1. Create new CRUD application from our Sample database, open Orders page and add Row component with three Column components with size 5, 5 and 2.

2. Add DatePicker components to first and second column and a Button component to third column.

3. Create start and end properties on page Load and bind DatePicker components Value property to start and end properties.

4. Invoke getOrders() method on Button component Click event with {Filter(start, end)} expression as filter parameter and set getOrdersResult to returned value.

5. Open the Orders.razor.cs file that Radzen has generated for your page to add the Filter method. Radzen generates that file only once and will not overwrite it.
using System;
namespace SampleBlazor.Pages
{
public partial class OrdersComponent
{
string Filter(DateTime? start, DateTime? end)
{
return $@"OrderDate >= DateTime(""{GetUTCString(start)}"") && OrderDate <= DateTime(""{GetUTCString(end)}"")";
}
string GetUTCString(DateTime? date)
{
return date.HasValue ?
date.Value.ToUniversalTime().ToString("yyyy-MM-ddTHH:mm:ssZ") : null;
}
}
}

6. Run the application and press filter button.

Radzen is free to use. You can also test the premium features for 15 days.
Start FreeSelect theme: