New to Telerik ReportingStart a free 30-day trial

Integrating the DateTimePicker Widget in the Native Blazor Report Viewer

Environment

ProductProgress® Telerik® Reporting
Project TypeBlazor
Report ViewerNative Blazor

Description

By default, the Native Blazor Report Viewer uses the Telerik Blazor UI DatePicker widget when displaying Report Parameters of [Type](slug:Telerik.Reporting.ReportParameter#Telerik_Reporting_ReportParameter_Type)DateTime`.

If you wish to display also the Time, the Telerik Blazor UI DateTimePicker widget can be implemented as a custom parameter editor for parameters of type DateTime. This will allow you also to edit the time.

Solution

CSHTML
<ReportViewer ... >
	<ParameterDateTimeTemplate>
		<TelerikDateTimePicker Value="@((DateTime)context.Value)"
						ValueChanged="@((DateTime value) => context.Value = value)">
		</TelerikDateTimePicker>
	</ParameterDateTimeTemplate>
</ReportViewer>

See Also