mirror of
https://gitee.com/blazorcomponent/MASA.Blazor.git
synced 2025-12-06 10:19:23 +08:00
* ♻ refactor: migrate all mobile components to a separate project
* remove unused files
* update
* update locale
* 🐛 fix: updating the logic of fetching latest release version
* update cicd
* update
47 lines
1.4 KiB
Plaintext
47 lines
1.4 KiB
Plaintext
@using Masa.Blazor.Presets
|
|
|
|
<div class="text-center">
|
|
<PMobilePicker @bind-Value="_value"
|
|
Columns="@_columns"
|
|
TColumn="List<string>"
|
|
TColumnItem="string"
|
|
TColumnItemValue="string"
|
|
ItemValue="item => item"
|
|
ItemText="item => item"
|
|
ItemHeight="64">
|
|
<ActivatorContent>
|
|
<MButton Color="primary" Class="text-capitalize" Text @attributes="@context.Attrs">
|
|
@(_value.Count == 0 ? "Please select" : string.Join(" ", _value))
|
|
</MButton>
|
|
</ActivatorContent>
|
|
</PMobilePicker>
|
|
</div>
|
|
|
|
@code {
|
|
|
|
private static readonly string DayOfWeek = DateTime.Now.DayOfWeek.ToString();
|
|
private static readonly string AmPm = DateTime.Now.Hour > 12 ? "PM" : "AM";
|
|
|
|
private readonly List<List<string>> _columns = new()
|
|
{
|
|
new List<string>
|
|
{
|
|
System.DayOfWeek.Monday.ToString(),
|
|
System.DayOfWeek.Tuesday.ToString(),
|
|
System.DayOfWeek.Wednesday.ToString(),
|
|
System.DayOfWeek.Thursday.ToString(),
|
|
System.DayOfWeek.Friday.ToString(),
|
|
System.DayOfWeek.Saturday.ToString(),
|
|
System.DayOfWeek.Sunday.ToString()
|
|
},
|
|
new List<string>
|
|
{
|
|
"AM",
|
|
"PM"
|
|
}
|
|
};
|
|
|
|
private List<string> _value = new() { DayOfWeek, AmPm };
|
|
|
|
}
|