diff --git a/DateTime.js b/DateTime.js index b0a9dadbc..08dfc6daa 100644 --- a/DateTime.js +++ b/DateTime.js @@ -32,27 +32,6 @@ var Datetime = createClass({ closeOnTab: TYPES.bool }, - getDefaultProps: function() { - var nof = function() {}; - return { - className: '', - defaultValue: '', - inputProps: {}, - input: true, - onFocus: nof, - onBlur: nof, - onChange: nof, - onViewModeChange: nof, - timeFormat: true, - timeConstraints: {}, - dateFormat: true, - strictParsing: true, - closeOnSelect: false, - closeOnTab: true, - utc: false - }; - }, - getInitialState: function() { var state = this.getStateFromProps( this.props ); @@ -448,6 +427,24 @@ var Datetime = createClass({ } }); +Datetime.defaultProps = { + className: '', + defaultValue: '', + inputProps: {}, + input: true, + onFocus: function() {}, + onBlur: function() {}, + onChange: function() {}, + onViewModeChange: function() {}, + timeFormat: true, + timeConstraints: {}, + dateFormat: true, + strictParsing: true, + closeOnSelect: false, + closeOnTab: true, + utc: false +}; + // Make moment accessible through the Datetime class Datetime.moment = moment;