mirror of
https://gitee.com/ant-design-blazor/ant-design-blazor.git
synced 2024-12-16 01:41:14 +08:00
c3b0b114e6
* feat: add form(not complete yet) * feat: add form(basic) * refactor: change namespace * feat(module: form): add onFinish, onFinishFailed, reset * feat(module: form): add layout demo * feat(module: form): update doc * refactor: basic form Co-authored-by: ElderJames <shunjiey@hotmail.com>
57 lines
1.4 KiB
C#
57 lines
1.4 KiB
C#
using System;
|
|
using Microsoft.AspNetCore.Components;
|
|
|
|
namespace AntDesign.Internal
|
|
{
|
|
public partial class DatePickerPanelChooser<TValue> : AntDomComponentBase
|
|
{
|
|
[Parameter]
|
|
public DatePickerBase<TValue> DatePicker { get; set; }
|
|
|
|
[Parameter]
|
|
public Action<DateTime, int> OnSelect { get; set; }
|
|
|
|
[Parameter]
|
|
public int PickerIndex { get; set; }
|
|
|
|
private bool IsShowDatePanel()
|
|
{
|
|
if (DatePicker.IsShowTime && PickerIndex != DatePicker.GetOnFocusPickerIndex())
|
|
{
|
|
return false;
|
|
}
|
|
return DatePicker.Picker == DatePickerType.Date;
|
|
}
|
|
|
|
private bool IsShowQuarterPanel()
|
|
{
|
|
return DatePicker.Picker == DatePickerType.Quarter;
|
|
}
|
|
|
|
private bool IsShowWeekPanel()
|
|
{
|
|
return DatePicker.Picker == DatePickerType.Week;
|
|
}
|
|
|
|
private bool IsShowMonthPanel()
|
|
{
|
|
return DatePicker.Picker == DatePickerType.Month;
|
|
}
|
|
|
|
private bool IsShowYearPanel()
|
|
{
|
|
return DatePicker.Picker == DatePickerType.Year;
|
|
}
|
|
|
|
private bool IsShowDecadePanel()
|
|
{
|
|
return DatePicker.Picker == DatePickerType.Decade;
|
|
}
|
|
|
|
private bool IsShowTimePanel()
|
|
{
|
|
return DatePicker.Picker == DatePickerType.Time;
|
|
}
|
|
}
|
|
}
|