ant-design-blazor/components/calendar/Calendar.razor
笨木头 cf959decf9 feat: add calendar (#176)
* 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
2020-06-03 10:24:16 +08:00

28 lines
876 B
C#

@namespace AntDesign
@inherits AntDomComponentBase
@using AntDesign.Internal
<div class="@ClassMapper.Class"
style="@Style"
id="@Id"
@ref="@Ref">
@if (HeaderRender != null)
{
@HeaderRender.Invoke(new CalendarHeaderRenderArgs {
Value = Value,
Type = Mode,
OnChange = new EventCallbackFactory().Create<DateTime>(this, ChangeValue),
OnTypeChange = new EventCallbackFactory().Create<string>(this, ChangePickerType),
});
}
else
{
<CascadingValue Value="this" Name="Calendar">
<CascadingValue Value="PrefixCls" Name="PrefixCls">
<CalendarHeader />
</CascadingValue>
</CascadingValue>
}
<CalendarPanelChooser Calendar="@this" PickerIndex="0" OnSelect="async (date, index) => await OnSelectValue(date)" />
</div>