one-design-next 0.0.30 → 0.0.31
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -130,8 +130,9 @@ var DatePicker = function DatePicker(props) {
|
|
|
130
130
|
if (isSameDay(maxDateProp, thisQuarterEnd)) {
|
|
131
131
|
return thisQuarterEnd;
|
|
132
132
|
}
|
|
133
|
-
|
|
134
|
-
|
|
133
|
+
// 上一季度末 = 当前季度起始月的前一天,避免直接 setMonth(-3) 时
|
|
134
|
+
// 保留 day 数导致 Q2→Q1(30 vs 31) 或 Q4→Q3(31 溢出 Oct 1) 等错误
|
|
135
|
+
var prevQuarterEnd = new Date(thisQuarterEnd.getFullYear(), thisQuarterEnd.getMonth() - 2, 0);
|
|
135
136
|
return prevQuarterEnd;
|
|
136
137
|
}
|
|
137
138
|
if (picker === 'month') {
|