2020-05-29 00:33:49 +08:00
|
|
|
|
@namespace AntDesign
|
2020-07-11 23:03:13 +08:00
|
|
|
|
@inherits DatePickerBase<TValue>
|
|
|
|
|
@typeparam TValue
|
2020-05-29 00:33:49 +08:00
|
|
|
|
@using AntDesign.Internal;
|
2020-05-18 14:46:42 +08:00
|
|
|
|
|
2021-04-06 20:02:53 +08:00
|
|
|
|
<CascadingValue Value='$"{PrefixCls}-dropdown"' Name="PrefixCls">
|
2020-06-01 14:09:28 +08:00
|
|
|
|
<OverlayTrigger @ref="@_dropDown"
|
2020-05-18 14:46:42 +08:00
|
|
|
|
Visible="Open"
|
2020-05-22 11:24:12 +08:00
|
|
|
|
IsButton="@true"
|
2020-05-18 14:46:42 +08:00
|
|
|
|
Disabled="Disabled"
|
|
|
|
|
PopupContainerSelector="@PopupContainerSelector"
|
2020-10-29 18:18:48 +08:00
|
|
|
|
OnVisibleChange="visible => { AutoFocus = visible; OnOpenChange.InvokeAsync(visible); }"
|
2021-03-12 15:46:48 +08:00
|
|
|
|
OverlayEnterCls="ant-slide-up-enter ant-slide-up-enter-active ant-slide-up"
|
|
|
|
|
OverlayLeaveCls="ant-slide-up-leave ant-slide-up-leave-active ant-slide-up"
|
2020-05-18 14:46:42 +08:00
|
|
|
|
Trigger="new TriggerType[] { TriggerType.Click }">
|
|
|
|
|
<Overlay>
|
|
|
|
|
<div class="@(PrefixCls)-panel-container">
|
2021-03-12 17:02:11 +08:00
|
|
|
|
<div class="@_panelClassMapper.Class">
|
2020-07-11 23:03:13 +08:00
|
|
|
|
<DatePickerPanelChooser TValue="TValue" DatePicker="@this" OnSelect="async (date, index) => await OnSelect(date)" />
|
2020-07-05 00:06:34 +08:00
|
|
|
|
</div>
|
2020-05-18 14:46:42 +08:00
|
|
|
|
</div>
|
|
|
|
|
</Overlay>
|
2021-01-21 17:20:10 +08:00
|
|
|
|
<Unbound>
|
2020-05-18 14:46:42 +08:00
|
|
|
|
<div class="@ClassMapper.Class"
|
2021-01-21 17:20:10 +08:00
|
|
|
|
@ref="@context.Current"
|
2020-06-01 14:09:28 +08:00
|
|
|
|
style="@Style"
|
|
|
|
|
Id="@Id">
|
2020-05-18 14:46:42 +08:00
|
|
|
|
<DatePickerInput @ref="_inputStart"
|
2020-06-01 14:09:28 +08:00
|
|
|
|
PrefixCls="@PrefixCls"
|
|
|
|
|
Size="@Size"
|
|
|
|
|
Disabled="@Disabled"
|
|
|
|
|
Value="@GetInputValue(0)"
|
|
|
|
|
Placeholder="@_placeholders[0]"
|
|
|
|
|
ReadOnly="@InputReadOnly"
|
|
|
|
|
AutoFocus="@AutoFocus"
|
2021-01-10 13:19:07 +08:00
|
|
|
|
OnClick="async e => { await OnInputClick(); }"
|
2021-02-20 17:54:12 +08:00
|
|
|
|
OnKeyUp="@OnKeyUp"
|
2020-06-01 14:09:28 +08:00
|
|
|
|
OnInput="e => OnInput(e, 0)"
|
2020-07-06 19:09:01 +08:00
|
|
|
|
ShowTime="@(Picker == DatePickerType.Time)"
|
|
|
|
|
OnClickClear="e => ClearValue(0)"
|
2021-01-21 17:20:10 +08:00
|
|
|
|
AllowClear="@AllowClear" />
|
2020-05-18 14:46:42 +08:00
|
|
|
|
</div>
|
2021-01-21 17:20:10 +08:00
|
|
|
|
</Unbound>
|
2020-05-22 11:24:12 +08:00
|
|
|
|
</OverlayTrigger>
|
2020-05-18 14:46:42 +08:00
|
|
|
|
</CascadingValue>
|