Skip to content
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
46 lines (40 sloc) 2.05 KB
@page "/datepicker"
@using NorthwindBlazor.Data
@using NorthwindBlazor.Models.Northwind
@using Microsoft.EntityFrameworkCore
<h1 style="display:inline">DatePicker</h1><a style="margin-left: 10px" href="" target="_blank">[source code]</a>
<p>This page demonstrates <b>DatePicker</b> component.</p>
<div class="row">
<div class="col-md-6">
<RadzenDatePicker Change="@(args => Change(args, "DatePicker", "MM/dd/yyyy"))" />
<h3 style="margin-top: 40px">DatePicker with time</h3>
<RadzenDatePicker ShowTime="true" Change="@(args => Change(args, "DatePicker with time", "MM/dd/yyyy HH:mm"))" DateFormat="MM/dd/yyyy HH:mm" />
<h3 style="margin-top: 40px">DatePicker with 12 hour time format</h3>
<RadzenDatePicker ShowTime="true" Change="@(args => Change(args, "DatePicker with 12 hour time format", "MM/dd/yyyy h:mm tt"))" HourFormat="12" DateFormat="MM/dd/yyyy h:mm tt" />
<h3 style="margin-top: 40px">Time-only DatePicker</h3>
<RadzenDatePicker ShowTime="true" TimeOnly="true" DateFormat="HH:mm" Change="@(args => Change(args, "Time-only DatePicker", "HH:mm"))" />
<h3 style="margin-top: 40px">Calendar</h3>
<RadzenDatePicker Inline="true" Change="@(args => Change(args, "Calendar", "MM/dd/yyyy"))" />
<div class="col-md-6">
<RadzenCard style="overflow: auto;height:750px;">
@foreach (var e in events.OrderByDescending(i => i.Key))
<br />
@code {
Dictionary<DateTime, string> events = new Dictionary<DateTime, string>();
void Change(DateTime? value, string name, string format)
events.Add(DateTime.Now, $"{name} value changed to {value?.ToString(format)}");
You can’t perform that action at this time.