Skip to content

Commit

Permalink
Multidate picker
Browse files Browse the repository at this point in the history
  • Loading branch information
Murali Suresh committed Jan 13, 2017
1 parent ef67d85 commit dfc4225
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 8 deletions.
6 changes: 3 additions & 3 deletions reactJS/app/components/RegisterComponent.js
Original file line number Diff line number Diff line change
Expand Up @@ -131,10 +131,10 @@ class RegisterComponent extends Component {
}

// Stores the selected date in the state object.
storeDate(date) {
storeDate(date,isSelected,selectedDates) {
(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");
: this.props.dispatch(popDateArray(date.format('ddd, MMM Do YYYY')));

// Limit the date selection as 6

Expand Down Expand Up @@ -207,7 +207,7 @@ class RegisterComponent extends Component {
renderChip(data) {
return (
<div className='col-xs-6'>
<Chip key={data} onRequestDelete={() => this.handleRequestDelete(data)} style={styles.chip}>
<Chip key={data} style={styles.chip}>
{data}
</Chip>
</div>
Expand Down
12 changes: 7 additions & 5 deletions reactJS/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@
"fixed-data-table-2": "^0.7.2",
"geolocator": "^2.0.0",
"graphql-tag": "^0.1.15",
"grunt": "^1.0.1",
"isomorphic-fetch": "^2.2.1",
"jade": "^1.11.0",
"json-loader": "^0.5.4",
Expand All @@ -56,20 +57,21 @@
"mongoose": "^4.4.17",
"morgan": "~1.7.0",
"native-base": "^0.5.9",
"react": "15.3.2",
"react": "^15.4.2",
"react-addons-css-transition-group": "^15.3.2",
"react-addons-shallow-compare": "^15.3.2",
"react-cookie": "^0.4.8",
"react-copy-to-clipboard": "^4.2.3",
"react-dom": "15.0.2",
"react-dom": "^15.0.2",
"react-geosuggest": "^1.25.0",
"react-hot-loader": "3.0.0-beta.5",
"react-infinite-calendar": "^1.1.14",
"react-infinite-calendar": "git+https://github.com/sureshmurali/react-infinite-calendar.git",
"react-native": "^0.40.0",
"react-redux": "^4.4.5",
"react-responsive": "^1.1.5",
"react-router": "^2.4.0",
"react-router-redux": "^4.0.4",
"react-tap-event-plugin": "^1.0.0",
"react-tap-event-plugin": "^2.0.1",
"redux": "^3.5.2",
"redux-logger": "^2.6.1",
"redux-thunk": "^2.1.0",
Expand All @@ -81,7 +83,7 @@
"babelify": "^7.3.0",
"espower-babel": "^4.0.3",
"gitbook-cli": "^2.1.3",
"grunt": "^1.0.1",
"grunt": "~1.0.1",
"grunt-browserify": "^5.0.0",
"grunt-cli": "^1.2.0",
"grunt-contrib-copy": "^1.0.0",
Expand Down

0 comments on commit dfc4225

Please sign in to comment.