mirror of
https://gitee.com/ant-design-blazor/ant-design-blazor.git
synced 2024-11-29 18:48:50 +08:00
fix(module: rangepicker): [selected date on end picker]、[quarter panel's ranges] are incorrect (#1260)
* fix(model: rangepicker): quarter panel's ranges are not correct * fix(module: rangepicker): selected date on end picker is incorrect
This commit is contained in:
parent
65d949ca7c
commit
e5225afb05
@ -176,7 +176,7 @@ namespace AntDesign
|
||||
int? second = null)
|
||||
{
|
||||
return DateHelper.CombineNewDate(
|
||||
GetIndexPickerValue(0),
|
||||
PickerValue,
|
||||
year,
|
||||
month,
|
||||
day,
|
||||
@ -188,16 +188,12 @@ namespace AntDesign
|
||||
|
||||
protected void ChangePickerYearValue(int interval)
|
||||
{
|
||||
var currentValue = GetIndexPickerValue(0);
|
||||
|
||||
ChangePickerValue(DateHelper.AddYearsSafely(currentValue, interval), null);
|
||||
ChangePickerValue(DateHelper.AddYearsSafely(PickerValue, interval), null);
|
||||
}
|
||||
|
||||
protected void ChangePickerMonthValue(int interval)
|
||||
{
|
||||
var currentValue = GetIndexPickerValue(0);
|
||||
|
||||
ChangePickerValue(DateHelper.AddMonthsSafely(currentValue, interval), null);
|
||||
ChangePickerValue(DateHelper.AddMonthsSafely(PickerValue, interval), null);
|
||||
}
|
||||
|
||||
protected void Close()
|
||||
|
@ -134,7 +134,8 @@ namespace AntDesign.Internal
|
||||
|
||||
private bool IsDateInRange(DateTime currentColDate)
|
||||
{
|
||||
if (!IsRange || !Picker.IsIn(DatePickerType.Date, DatePickerType.Year, DatePickerType.Month))
|
||||
if (!IsRange ||
|
||||
!Picker.IsIn(DatePickerType.Date, DatePickerType.Year, DatePickerType.Month, DatePickerType.Quarter))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
@ -209,7 +210,7 @@ namespace AntDesign.Internal
|
||||
private string GetRangeHoverCls(DateTime currentColDate)
|
||||
{
|
||||
if (!IsRange || DatePicker.HoverDateTime == null
|
||||
|| Picker.IsIn(DatePickerType.Date, DatePickerType.Year, DatePickerType.Month) == false)
|
||||
|| Picker.IsIn(DatePickerType.Date, DatePickerType.Year, DatePickerType.Month, DatePickerType.Quarter) == false)
|
||||
{
|
||||
return "";
|
||||
}
|
||||
@ -291,7 +292,7 @@ namespace AntDesign.Internal
|
||||
|
||||
private string GetRangeStartCls(DateTime currentColDate)
|
||||
{
|
||||
if (!IsRange || Picker.IsIn(DatePickerType.Date, DatePickerType.Year, DatePickerType.Month) == false)
|
||||
if (!IsRange || Picker.IsIn(DatePickerType.Date, DatePickerType.Year, DatePickerType.Month, DatePickerType.Quarter) == false)
|
||||
{
|
||||
return "";
|
||||
}
|
||||
@ -332,7 +333,7 @@ namespace AntDesign.Internal
|
||||
|
||||
private string GetRangeEndCls(DateTime currentColDate)
|
||||
{
|
||||
if (!IsRange || Picker.IsIn(DatePickerType.Date, DatePickerType.Year, DatePickerType.Month) == false)
|
||||
if (!IsRange || Picker.IsIn(DatePickerType.Date, DatePickerType.Year, DatePickerType.Month, DatePickerType.Quarter) == false)
|
||||
{
|
||||
return "";
|
||||
}
|
||||
@ -374,7 +375,7 @@ namespace AntDesign.Internal
|
||||
|
||||
private string GetRangeEdgeCls(DateTime currentColDate)
|
||||
{
|
||||
if (!IsRange || Picker.IsIn(DatePickerType.Date, DatePickerType.Year, DatePickerType.Month) == false)
|
||||
if (!IsRange || Picker.IsIn(DatePickerType.Date, DatePickerType.Year, DatePickerType.Month, DatePickerType.Quarter) == false)
|
||||
{
|
||||
return "";
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user