1
0
mirror of https://github.com/ascribe/onion.git synced 2024-11-15 01:25:17 +01:00

Merge remote-tracking branch 'origin/AD-661-due-1208-implement-jury-rating-an' into AD-661-due-1208-implement-jury-rating-an

This commit is contained in:
diminator 2015-08-27 09:22:08 +02:00
commit 144b823777
3 changed files with 12 additions and 3 deletions

View File

@ -173,6 +173,8 @@ let LoanForm = React.createClass({
<Property
name='startdate'
label={getLangText('Start date')}
editable={!this.props.startdate}
overrideForm={!!this.props.startdate}
hidden={!this.props.showStartDate}>
<InputDate
defaultValue={this.props.startdate}
@ -180,6 +182,8 @@ let LoanForm = React.createClass({
</Property>
<Property
name='enddate'
editable={!this.props.enddate}
overrideForm={!!this.props.enddate}
label={getLangText('End date')}
hidden={!this.props.showEndDate}>
<InputDate

View File

@ -9,7 +9,11 @@ let InputDate = React.createClass({
submitted: React.PropTypes.bool,
placeholderText: React.PropTypes.string,
onChange: React.PropTypes.func,
defaultValue: React.PropTypes.object
defaultValue: React.PropTypes.object,
// DatePicker implements the disabled attribute
// https://github.com/Hacker0x01/react-datepicker/blob/master/src/datepicker.jsx#L30
disabled: React.PropTypes.bool
},
getInitialState() {
@ -41,10 +45,11 @@ let InputDate = React.createClass({
});
},
render: function () {
render() {
return (
<div>
<DatePicker
disabled={this.props.disabled}
dateFormat="YYYY-MM-DD"
selected={this.state.value_moment}
onChange={this.handleChange}

View File

@ -73,7 +73,7 @@
"raven-js": "^1.1.19",
"react": "^0.13.2",
"react-bootstrap": "^0.24.3",
"react-datepicker": "~0.8.0",
"react-datepicker": "^0.12.0",
"react-progressbar": "^1.1.0",
"react-router": "^0.13.3",
"react-router-bootstrap": "~0.16.0",