mirror of
https://gitee.com/ant-design-blazor/ant-design-blazor.git
synced 2024-12-14 17:01:18 +08:00
cf959decf9
* feat: refactor datePicker, add Calendar(basic) * feat: add calendar and demos * fix: timePicker format error * fix: release comments * refactor: replace @bind-Value with Value * refactor: replace @bind-Value with Value * fix: conflit
48 lines
1.1 KiB
C#
48 lines
1.1 KiB
C#
using System;
|
|
using Microsoft.AspNetCore.Components;
|
|
|
|
namespace AntDesign.Internal
|
|
{
|
|
public partial class CalendarPanelChooser : AntDomComponentBase
|
|
{
|
|
[Parameter]
|
|
public Calendar Calendar { get; set; }
|
|
|
|
[Parameter]
|
|
public Action<DateTime, int> OnSelect { get; set; }
|
|
|
|
[Parameter]
|
|
public int PickerIndex { get; set; }
|
|
|
|
private bool IsShowDatePanel()
|
|
{
|
|
return Calendar.Picker == DatePickerType.Date;
|
|
}
|
|
|
|
private bool IsShowQuarterPanel()
|
|
{
|
|
return Calendar.Picker == DatePickerType.Quarter;
|
|
}
|
|
|
|
private bool IsShowWeekPanel()
|
|
{
|
|
return Calendar.Picker == DatePickerType.Week;
|
|
}
|
|
|
|
private bool IsShowMonthPanel()
|
|
{
|
|
return Calendar.Picker == DatePickerType.Month;
|
|
}
|
|
|
|
private bool IsShowYearPanel()
|
|
{
|
|
return Calendar.Picker == DatePickerType.Year;
|
|
}
|
|
|
|
private bool IsShowDecadePanel()
|
|
{
|
|
return Calendar.Picker == DatePickerType.Decade;
|
|
}
|
|
}
|
|
}
|