Skip to content

Commit

Permalink
removed the date limit #83
Browse files Browse the repository at this point in the history
  • Loading branch information
Ganesh Diwaakar committed Dec 1, 2016
1 parent a56e7f0 commit 5c05264
Showing 1 changed file with 13 additions and 7 deletions.
20 changes: 13 additions & 7 deletions reactJS/app/components/RegisterComponent.js
Original file line number Diff line number Diff line change
Expand Up @@ -120,13 +120,19 @@ class RegisterComponent extends Component {

// Stores the selected date in the state object.
storeDate(date) {
if (this.props.dateArray.length <= 5) {
(this.props.dateArray.indexOf(date.format('ddd, MMM Do YYYY')) == -1)
? this.props.dispatch(storeDateArray(date.format('ddd, MMM Do YYYY')))
: console.log("Duplicate date");
} else {
this.props.dispatch(storeDateArrayErrorLabel(this.props.languageJson.dateArrayExcessErrorLabel));
}
(this.props.dateArray.indexOf(date.format('ddd, MMM Do YYYY')) == -1)
? this.props.dispatch(storeDateArray(date.format('ddd, MMM Do YYYY')))
: console.log("Duplicate date");

// Limit the date selection as 6

// if (this.props.dateArray.length <= 5) {
// (this.props.dateArray.indexOf(date.format('ddd, MMM Do YYYY')) == -1)
// ? this.props.dispatch(storeDateArray(date.format('ddd, MMM Do YYYY')))
// : console.log("Duplicate date");
// } else {
// this.props.dispatch(storeDateArrayErrorLabel(this.props.languageJson.dateArrayExcessErrorLabel));
// }
}

storeLocation(location) {
Expand Down

0 comments on commit 5c05264

Please sign in to comment.