mirror of
https://gitee.com/ant-design-blazor/ant-design-blazor.git
synced 2024-12-05 05:27:37 +08:00
fix(module: datepicker): incorrect week comparison causes disabled input (#2889)
This commit is contained in:
parent
18ff8e3dee
commit
b83175b3f0
@ -1,4 +1,4 @@
|
||||
using System;
|
||||
using System;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using AntDesign.Core.Extensions;
|
||||
@ -106,7 +106,8 @@ namespace AntDesign
|
||||
{
|
||||
var date1Week = DateHelper.GetWeekOfYear(date1, Locale.FirstDayOfWeek);
|
||||
var date2Week = DateHelper.GetWeekOfYear(date2, Locale.FirstDayOfWeek);
|
||||
return index == 0 ? date1Week < date2Week : date1Week > date2Week;
|
||||
return index == 0 ? date1Week < date2Week && date1.Year <= date2.Year
|
||||
: date1.Year >= date2.Year && date1Week > date2Week;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user