diff --git a/js/components/ascribe_forms/form_loan.js b/js/components/ascribe_forms/form_loan.js
index be44bb54..9a1cce27 100644
--- a/js/components/ascribe_forms/form_loan.js
+++ b/js/components/ascribe_forms/form_loan.js
@@ -108,13 +108,15 @@ ${username}`;
submitted={this.state.submitted}/>
-
+
@@ -141,4 +143,4 @@ ${username}`;
}
});
-export default LoanForm;
\ No newline at end of file
+export default LoanForm;
diff --git a/js/components/ascribe_forms/input_date.js b/js/components/ascribe_forms/input_date.js
index aa3e9e94..98422c72 100644
--- a/js/components/ascribe_forms/input_date.js
+++ b/js/components/ascribe_forms/input_date.js
@@ -8,19 +8,15 @@ let InputDate = React.createClass({
mixins : [AlertMixin],
getInitialState() {
- return {value: '2015-01-01',
+ return {value: null,
alerts: null // needed in AlertMixin
};
},
- handleChange(moment_date) {
- this.setState({value: moment_date.format("YYYY-MM-DD")});
- },
- isValidDate: function (str) {
- return (
- /^[0-9]{4}$/.test(str) &&
- moment(str, 'YYYY-MM-DD').isValid()
- );
+
+ handleChange(date) {
+ this.setState({value: date});
},
+
render: function () {
let className = "form-control input-text-ascribe";
let alerts = (this.props.submitted) ? null : this.state.alerts;
@@ -28,7 +24,9 @@ let InputDate = React.createClass({
);
//return (
@@ -50,4 +48,4 @@ let InputDate = React.createClass({
}
});
-export default InputDate;
\ No newline at end of file
+export default InputDate;