Skip to content

Commit 3502f66

Browse files
committed
added isDisabled prop to datetime field
1 parent b9158de commit 3502f66

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

DateTime.js

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,8 @@ var Datetime = React.createClass({
3535
viewMode: TYPES.oneOf(['years', 'months', 'days', 'time']),
3636
isValidDate: TYPES.func,
3737
open: TYPES.bool,
38-
strictParsing: TYPES.bool
38+
strictParsing: TYPES.bool,
39+
isDisabled: TYPES.bool
3940
},
4041

4142
getDefaultProps: function() {
@@ -51,7 +52,8 @@ var Datetime = React.createClass({
5152
onChange: nof,
5253
timeFormat: true,
5354
dateFormat: true,
54-
strictParsing: true
55+
strictParsing: true,
56+
isDisabled: false
5557
};
5658
},
5759

@@ -321,7 +323,8 @@ var Datetime = React.createClass({
321323
className: 'form-control',
322324
onFocus: this.openCalendar,
323325
onChange: this.onInputChange,
324-
value: this.state.inputValue
326+
value: this.state.inputValue,
327+
disabled: this.props.isDisabled
325328
}, this.props.inputProps ))];
326329
}
327330
else {

0 commit comments

Comments
 (0)