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
|
|
|
|
|
|
|
|
|
<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); }"
|
2020-05-24 12:03:20 +08:00
|
|
|
|
OverlayEnterCls="slide-up-enter slide-up-enter-active slide-up"
|
|
|
|
|
OverlayLeaveCls="slide-up-leave slide-up-leave-active slide-up"
|
2020-05-18 14:46:42 +08:00
|
|
|
|
Trigger="new TriggerType[] { TriggerType.Click }">
|
|
|
|
|
<Overlay>
|
|
|
|
|
<div class="@(PrefixCls)-panel-container">
|
2020-07-05 00:06:34 +08:00
|
|
|
|
<div class="@(PrefixCls)-panel">
|
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>
|
|
|
|
|
<ChildContent>
|
|
|
|
|
<div class="@ClassMapper.Class"
|
2020-06-01 14:09:28 +08:00
|
|
|
|
@ref="@Ref"
|
|
|
|
|
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"
|
|
|
|
|
OnClick="async e => { await _dropDown.Show(); ChangeFocusTarget(true, false); }"
|
|
|
|
|
OnInput="e => OnInput(e, 0)"
|
2020-07-06 19:09:01 +08:00
|
|
|
|
ShowTime="@(Picker == DatePickerType.Time)"
|
|
|
|
|
OnClickClear="e => ClearValue(0)"
|
|
|
|
|
AllowClear="@AllowClear"/>
|
2020-05-18 14:46:42 +08:00
|
|
|
|
</div>
|
|
|
|
|
</ChildContent>
|
2020-05-22 11:24:12 +08:00
|
|
|
|
</OverlayTrigger>
|
2020-05-18 14:46:42 +08:00
|
|
|
|
</CascadingValue>
|