Skip to content

Commit

Permalink
已在 WillReceiveProps 生命周期 set 限定时间范围,无需在handleChange 再次 set
Browse files Browse the repository at this point in the history
  • Loading branch information
chenghua.li authored and hazel54 committed Mar 1, 2019
1 parent 3412fc3 commit fe00875
Showing 1 changed file with 0 additions and 7 deletions.
7 changes: 0 additions & 7 deletions src/date-picker/panel/TimeRangePanel.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -116,13 +116,6 @@ export default class TimeRangePanel extends PopperBase {
[field]: ndate
};

const { minTime, maxTime } = this.state;
state.minSelectableRange = [[MIN_TIME, maxTime]];
state.maxSelectableRange = [[minTime, MAX_TIME]];

state.minTime = limitRange(minTime, state.minSelectableRange);
state.maxTime = limitRange(maxTime, state.maxSelectableRange);

this.setState(state);
this.handleConfirm(true);

Expand Down

0 comments on commit fe00875

Please sign in to comment.