mirror of
https://gitee.com/ant-design-blazor/ant-design-blazor.git
synced 2024-12-14 08:51:27 +08:00
2a05064c25
* fix(module:DatePicker): input OnClick has new event handler * fix(module:DateTime): remove misleading reliance on picker index * fix(module: DatePicker & RangePicker): DefaultValue type change DefaultValue type change to align with Value type * fix(module:rangepicker): add default values helper with tests * fix(module:datepicker): ChangePickerValue action declaration fix Picker value is served based on input index (start/end) * fix(module:DatePicker): optimization ViewStartDate, MaxRow & MaxCol do not cause refresh if not changed * fix(module:DatePicker): min date fix ArgumentOutOfRangeException fix for dates before DateTime.MinValue * fix(module:RangePicker): sorted values Values get ordered on set * fix(module:DatePicker): OneOf switch to TValue * fix(module:DatePicker): code optimization and PickerValue fix PickerValue fix gets first panel value and evaluates second panel value * fix(module:DatePicker): default values evaluation * fix(module:RangePicker): default picker value fix * docs(module:DatePicker): switch to TValue for DefaultValue * fix(module:RangePicker): other value picker fix * fix(module:RangePicker): on value init include DefaultValue Co-authored-by: James Yeung <shunjiey@hotmail.com>
45 lines
2.0 KiB
C#
45 lines
2.0 KiB
C#
@namespace AntDesign
|
|
@inherits DatePickerBase<TValue>
|
|
@typeparam TValue
|
|
@using AntDesign.Internal;
|
|
|
|
<CascadingValue Value='$"{PrefixCls}-dropdown"' Name="PrefixCls">
|
|
<OverlayTrigger @ref="@_dropDown"
|
|
Visible="Open"
|
|
IsButton="@true"
|
|
Disabled="Disabled"
|
|
PopupContainerSelector="@PopupContainerSelector"
|
|
OnVisibleChange="visible => { AutoFocus = visible; OnOpenChange.InvokeAsync(visible); }"
|
|
OverlayEnterCls="slide-up-enter slide-up-enter-active slide-up"
|
|
OverlayLeaveCls="slide-up-leave slide-up-leave-active slide-up"
|
|
Trigger="new TriggerType[] { TriggerType.Click }">
|
|
<Overlay>
|
|
<div class="@(PrefixCls)-panel-container">
|
|
<div class="@(PrefixCls)-panel">
|
|
<DatePickerPanelChooser TValue="TValue" DatePicker="@this" OnSelect="async (date, index) => await OnSelect(date)" />
|
|
</div>
|
|
</div>
|
|
</Overlay>
|
|
<ChildContent>
|
|
<div class="@ClassMapper.Class"
|
|
@ref="@Ref"
|
|
style="@Style"
|
|
Id="@Id">
|
|
<DatePickerInput @ref="_inputStart"
|
|
PrefixCls="@PrefixCls"
|
|
Size="@Size"
|
|
Disabled="@Disabled"
|
|
Value="@GetInputValue(0)"
|
|
Placeholder="@_placeholders[0]"
|
|
ReadOnly="@InputReadOnly"
|
|
AutoFocus="@AutoFocus"
|
|
OnClick="async e => { await OnInputClick(); }"
|
|
OnInput="e => OnInput(e, 0)"
|
|
ShowTime="@(Picker == DatePickerType.Time)"
|
|
OnClickClear="e => ClearValue(0)"
|
|
AllowClear="@AllowClear"/>
|
|
</div>
|
|
</ChildContent>
|
|
</OverlayTrigger>
|
|
</CascadingValue>
|