hotfix/2.15.1.2407.01
This commit is contained in:
parent
892114dbc2
commit
6a33d3d99c
|
|
@ -412,7 +412,10 @@ const StatisticalScopePicker = (props) => {
|
|||
<WeaDatePicker
|
||||
value={startDate} disabled={disabled}
|
||||
disabledDate={(current) => {
|
||||
return current && endDate && current.getTime() > new Date(endDate).getTime();
|
||||
if (!current || !endDate) return false;
|
||||
const start = moment(startDate || endDate).subtract(11, "months").format("YYYY-MM");
|
||||
const end = moment(startDate).add(12, "months").format("YYYY-MM");
|
||||
return current.getTime() < new Date(start).getTime() || current.getTime() > new Date(endDate || end).getTime();
|
||||
}}
|
||||
format="YYYY-MM"
|
||||
onChange={(val) => onChange([val, endDate], timeType)}
|
||||
|
|
@ -422,7 +425,11 @@ const StatisticalScopePicker = (props) => {
|
|||
<WeaDatePicker
|
||||
value={endDate} disabled={disabled}
|
||||
disabledDate={(current) => {
|
||||
return current && startDate && current.getTime() < new Date(startDate).getTime();
|
||||
if (!current || !startDate) return false;
|
||||
const start = moment(endDate).subtract(12, "months").format("YYYY-MM");
|
||||
const end = moment(endDate || startDate).add(12, "months").format("YYYY-MM");
|
||||
|
||||
return current.getTime() > new Date(end).getTime() || current.getTime() < new Date(startDate || start).getTime();
|
||||
}}
|
||||
format="YYYY-MM"
|
||||
viewAttr={viewAttr}
|
||||
|
|
|
|||
Loading…
Reference in New Issue