2020-06-01 14:09:28 +08:00
|
|
|
|
@namespace AntDesign
|
2020-08-14 12:43:48 +08:00
|
|
|
|
@inherits DatePickerBase<TValue>
|
2020-07-11 23:03:13 +08:00
|
|
|
|
@typeparam TValue
|
2020-06-01 14:09:28 +08:00
|
|
|
|
@using AntDesign.Internal;
|
|
|
|
|
|
|
|
|
|
<CascadingValue Value='$"{PrefixCls}-dropdown"' Name="PrefixCls">
|
|
|
|
|
<OverlayTrigger @ref="_dropDown"
|
|
|
|
|
Visible="Open"
|
|
|
|
|
IsButton="@true"
|
|
|
|
|
Disabled="Disabled"
|
|
|
|
|
PopupContainerSelector="@PopupContainerSelector"
|
|
|
|
|
OnVisibleChange="visible => AutoFocus = visible"
|
2020-07-06 19:09:01 +08:00
|
|
|
|
OverlayEnterCls="slide-up-enter slide-up-enter-active slide-up ant-picker-dropdown-range"
|
|
|
|
|
OverlayLeaveCls="slide-up-leave slide-up-leave-active slide-up ant-picker-dropdown-range"
|
2020-06-01 14:09:28 +08:00
|
|
|
|
Trigger="new TriggerType[] { TriggerType.Click }">
|
|
|
|
|
<Overlay>
|
2020-08-14 12:43:48 +08:00
|
|
|
|
<div class="@(PrefixCls)-range-arrow" style="@_rangeArrowStyle"/>
|
2020-06-01 14:09:28 +08:00
|
|
|
|
<div class="@(PrefixCls)-panel-container">
|
2020-08-14 12:43:48 +08:00
|
|
|
|
<div class="@(PrefixCls)-panels">
|
|
|
|
|
<div class="@(PrefixCls)-panel">
|
|
|
|
|
<DatePickerPanelChooser TValue="TValue" DatePicker="@this" PickerIndex="0" OnSelect="async (date, index) => await OnSelect(date)"/>
|
2020-06-01 14:09:28 +08:00
|
|
|
|
</div>
|
|
|
|
|
<div class="@(PrefixCls)-panel">
|
2020-08-14 12:43:48 +08:00
|
|
|
|
<DatePickerPanelChooser TValue="TValue" DatePicker="@this" PickerIndex="1" OnSelect="async (date, index) => await OnSelect(date)"/>
|
2020-06-01 14:09:28 +08:00
|
|
|
|
</div>
|
2020-08-14 12:43:48 +08:00
|
|
|
|
</div>
|
2020-06-01 14:09:28 +08:00
|
|
|
|
</div>
|
|
|
|
|
</Overlay>
|
|
|
|
|
<ChildContent>
|
|
|
|
|
<div class="@ClassMapper.Class"
|
2020-07-05 00:06:34 +08:00
|
|
|
|
@ref="@Ref"
|
|
|
|
|
style="@Style"
|
|
|
|
|
Id="@Id">
|
2020-06-01 14:09:28 +08:00
|
|
|
|
<DatePickerInput @ref="_inputStart"
|
2020-07-05 00:06:34 +08:00
|
|
|
|
PrefixCls="@PrefixCls"
|
|
|
|
|
Size="@Size"
|
|
|
|
|
Disabled="@Disabled"
|
|
|
|
|
Value="@GetInputValue(0)"
|
|
|
|
|
Placeholder="@_placeholders[0]"
|
|
|
|
|
ReadOnly="@InputReadOnly"
|
|
|
|
|
AutoFocus="@AutoFocus"
|
|
|
|
|
OnClick="async e => { await OnInputClick(0); }"
|
|
|
|
|
OnInput="e => OnInput(e, 0)"
|
2020-07-06 19:09:01 +08:00
|
|
|
|
ShowTime="@(Picker == DatePickerType.Time)"
|
|
|
|
|
ShowSuffixIcon="false"
|
|
|
|
|
IsRange="@IsRange"
|
|
|
|
|
AllowClear="@AllowClear"
|
|
|
|
|
OnClickClear="e => ClearValue(0)"
|
|
|
|
|
/>
|
2020-06-01 14:09:28 +08:00
|
|
|
|
|
2020-08-14 12:43:48 +08:00
|
|
|
|
<div class="@(PrefixCls)-range-separator">
|
|
|
|
|
<span aria-label="to" class="@(PrefixCls)-separator">
|
|
|
|
|
<Icon Type="swap-right" Theme="outline" />
|
|
|
|
|
</span>
|
|
|
|
|
</div>
|
2020-06-01 14:09:28 +08:00
|
|
|
|
|
2020-08-14 12:43:48 +08:00
|
|
|
|
<DatePickerInput @ref="_inputEnd"
|
|
|
|
|
PrefixCls="@PrefixCls"
|
|
|
|
|
Size="@Size"
|
|
|
|
|
Disabled="@Disabled"
|
|
|
|
|
Value="@GetInputValue(1)"
|
|
|
|
|
Placeholder="@_placeholders[1]"
|
|
|
|
|
ReadOnly="@InputReadOnly"
|
|
|
|
|
AutoFocus="@AutoFocus"
|
|
|
|
|
OnClick="async e => { await OnInputClick(1); }"
|
|
|
|
|
OnInput="e => OnInput(e, 0)"
|
|
|
|
|
ShowTime="@(Picker == DatePickerType.Time)"
|
|
|
|
|
IsRange="@IsRange"
|
|
|
|
|
AllowClear="@AllowClear"
|
|
|
|
|
OnClickClear="e => ClearValue(0)"
|
|
|
|
|
/>
|
|
|
|
|
<div class="@(PrefixCls)-active-bar" style="@_activeBarStyle"></div>
|
2020-06-01 14:09:28 +08:00
|
|
|
|
</div>
|
|
|
|
|
</ChildContent>
|
|
|
|
|
</OverlayTrigger>
|
2020-07-06 19:09:01 +08:00
|
|
|
|
</CascadingValue>
|