Skip to content

Commit

Permalink
release v2.0.4
Browse files Browse the repository at this point in the history
  • Loading branch information
lanjingling0510 committed Jul 12, 2016
1 parent fd8b141 commit 809e0da
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 3 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
v2.0.4 - Tue, 12 Jul 2016 09:16:42 GMT
--------------------------------------

-


v2.0.3 - Tue, 12 Jul 2016 09:15:00 GMT
--------------------------------------

Expand Down
15 changes: 14 additions & 1 deletion dist/mobile-datepicker.js
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,6 @@ return /******/ (function(modules) { // webpackBootstrap
var _this = _possibleConstructorReturn(this, Object.getPrototypeOf(DatePicker).call(this, props));

_this.state = {
angle: 0,
date: _this._productDate(props.date),
minDate: _this._productDate(props.minDate),
maxDate: _this._productDate(props.maxDate)
Expand All @@ -136,6 +135,20 @@ return /******/ (function(modules) { // webpackBootstrap
}

_createClass(DatePicker, [{
key: 'componentWillReceiveProps',
value: function componentWillReceiveProps(nextProps) {
this.setState({
date: this._productDate(nextProps.date),
minDate: this._productDate(nextProps.minDate),
maxDate: this._productDate(nextProps.maxDate)
});
}
}, {
key: 'shouldComponentUpdate',
value: function shouldComponentUpdate(nextProps, nextState) {
return nextState.date.timestamp !== this.state.date.timestamp || nextProps.date !== this.props.date || nextProps.minDate !== this.props.minDate || nextProps.maxDate !== this.props.maxDate;
}
}, {
key: '_productDate',
value: function _productDate(date) {
var nDate = (0, _time.nextDate)(date, 0);
Expand Down
Loading

0 comments on commit 809e0da

Please sign in to comment.