forked from CodeBeamOrg/CodeBeam.MudBlazor.Extensions
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDateTimePickerExample2.razor
More file actions
27 lines (24 loc) · 1.39 KB
/
Copy pathDateTimePickerExample2.razor
File metadata and controls
27 lines (24 loc) · 1.39 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
@namespace MudExtensions.Docs.Examples
@using MudBlazor.Extensions
<MudGrid>
<MudItem xs="12" sm="8">
<MudDateTimePicker @bind-Value="_date" Editable="_editable" Label="DateTime" Clearable="_clearable" Variant="Variant.Outlined" Color="Color.Primary" />
<MudDateTimePicker @bind-Value="_date2" Editable="_editable" Label="DateTimeOffset" Clearable="_clearable" Variant="Variant.Outlined" Color="Color.Primary" />
<MudDateTimePicker @bind-Value="_date2" Editable="_editable" Label="TimeZone Istanbul" Clearable="_clearable" Variant="Variant.Outlined" Color="Color.Primary"
TimeZone="@TimeZoneInfo.FindSystemTimeZoneById("Europe/Istanbul")" />
<MudDateTimePicker @bind-Value="_date3" Editable="_editable" Label="DateOnly" Clearable="_clearable" Variant="Variant.Outlined" Color="Color.Primary" />
</MudItem>
<MudItem xs="12" sm="4">
<MudStack Spacing="2">
<MudSwitchM3 @bind-Value="_editable" Color="Color.Secondary" Label="Editable" />
<MudSwitchM3 @bind-Value="_clearable" Color="Color.Secondary" Label="Clearable" />
</MudStack>
</MudItem>
</MudGrid>
@code {
private DateTime? _date = DateTime.Now;
private DateTimeOffset _date2 = DateTimeOffset.UtcNow;
private DateOnly _date3 = DateOnly.FromDateTime(DateTime.Now);
private bool _clearable = false;
private bool _editable = false;
}