Skip to content

Commit 92c84a5

Browse files
committed
updated to readonly state
1 parent 3502f66 commit 92c84a5

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
@@ -36,7 +36,8 @@ var Datetime = React.createClass({
3636
isValidDate: TYPES.func,
3737
open: TYPES.bool,
3838
strictParsing: TYPES.bool,
39-
isDisabled: TYPES.bool
39+
disabled: TYPES.bool,
40+
readOnly: TYPES.oneOf(['readonly', ''])
4041
},
4142

4243
getDefaultProps: function() {
@@ -53,7 +54,8 @@ var Datetime = React.createClass({
5354
timeFormat: true,
5455
dateFormat: true,
5556
strictParsing: true,
56-
isDisabled: false
57+
disabled: false,
58+
readOnly: ''
5759
};
5860
},
5961

@@ -324,7 +326,8 @@ var Datetime = React.createClass({
324326
onFocus: this.openCalendar,
325327
onChange: this.onInputChange,
326328
value: this.state.inputValue,
327-
disabled: this.props.isDisabled
329+
disabled: this.props.disabled,
330+
readOnly: this.props.readOnly
328331
}, this.props.inputProps ))];
329332
}
330333
else {

0 commit comments

Comments
 (0)