Skip to content

Commit

Permalink
fix(bee-datepicker): yearpanel bug fix
Browse files Browse the repository at this point in the history
  • Loading branch information
lucian55 committed Nov 27, 2019
1 parent 1f7972f commit 3853447
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion build/rc-calendar/year/YearPanel.js
Expand Up @@ -100,7 +100,7 @@ var YearPanel = function (_React$Component) {

_this.prefixCls = props.rootPrefixCls + '-year-panel';
_this.state = {
value: props.value || props.defaultValue
value: props.value || props.defaultValue || (0, _moment2["default"])()
};
_this.nextDecade = goYear.bind(_this, 10);
_this.previousDecade = goYear.bind(_this, -10);
Expand Down
2 changes: 1 addition & 1 deletion dist/demo.js
Expand Up @@ -54688,7 +54688,7 @@

_this.prefixCls = props.rootPrefixCls + '-year-panel';
_this.state = {
value: props.value || props.defaultValue
value: props.value || props.defaultValue || (0, _moment2['default'])()
};
_this.nextDecade = goYear.bind(_this, 10);
_this.previousDecade = goYear.bind(_this, -10);
Expand Down
2 changes: 1 addition & 1 deletion dist/demo.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
@@ -1,6 +1,6 @@
{
"name": "bee-datepicker",
"version": "2.3.3",
"version": "2.3.4",
"description": "DatePicker ui component for react",
"keywords": [
"react",
Expand Down
2 changes: 1 addition & 1 deletion src/rc-calendar/year/YearPanel.jsx
Expand Up @@ -28,7 +28,7 @@ class YearPanel extends React.Component {
super(props);
this.prefixCls = `${props.rootPrefixCls}-year-panel`;
this.state = {
value: props.value || props.defaultValue,
value: props.value || props.defaultValue||moment(),
};
this.nextDecade = goYear.bind(this, 10);
this.previousDecade = goYear.bind(this, -10);
Expand Down

0 comments on commit 3853447

Please sign in to comment.