Skip to content

Commit

Permalink
Merge pull request #3952 from reactioncommerce/chore-3443-mikemurray-…
Browse files Browse the repository at this point in the history
…upgrade-react-dates

chore: upgrade react-dates to 16.3.6
  • Loading branch information
spencern committed Mar 9, 2018
2 parents 4856af5 + 7a608ab commit 9f7fb22
Show file tree
Hide file tree
Showing 4 changed files with 85 additions and 28 deletions.
Expand Up @@ -52,14 +52,21 @@ class CalendarPicker extends Component {
});
}

renderDayContents(day) {
return (
<span className="CalendarDay__contents">{day.format("D")}</span>
);
}

render() {
const { focusedInput, startDate, endDate } = this.state;
const { focusedInput, startDate, endDate, renderDayContents } = this.state;

const props = omit(this.props, ["autoFocus", "autoFocusEndDate", "initialStartDate", "initialEndDate"]);

return (
<DayPickerRangeController
{...props}
renderDayContents={renderDayContents || this.renderDayContents}
onDatesChange={this.onDatesChange}
onFocusChange={this.onFocusChange}
focusedInput={focusedInput}
Expand All @@ -80,7 +87,7 @@ CalendarPicker.defaultProps = {
initialEndDate: null,

// day presentation and interaction related props
renderDay: null,
renderDayContents: null,
minimumNights: 1,
isDayBlocked: () => false,
isDayHighlighted: () => false,
Expand Down Expand Up @@ -126,7 +133,7 @@ CalendarPicker.propTypes = {
onOutsideClick: PropTypes.func,
onPrevMonthClick: PropTypes.func,
renderCalendarInfo: PropTypes.func,
renderDay: PropTypes.func,
renderDayContents: PropTypes.func,
withPortal: PropTypes.bool
};

Expand Down
Expand Up @@ -96,7 +96,12 @@
color: @rui-default-text;
background: #f7f7f7;

button {
.CalendarDay__contents {
display: flex;
width: 100%;
height: 100%;
justify-content: center;
align-items: center;
background: @rui-info;
border-radius: 50%;
}
Expand Down
89 changes: 67 additions & 22 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Expand Up @@ -19,8 +19,8 @@
"url": "https://github.com/reactioncommerce/reaction/issues"
},
"dependencies": {
"@reactioncommerce/job-queue": "^1.0.4",
"@babel/runtime": "7.0.0-beta.38",
"@reactioncommerce/job-queue": "^1.0.4",
"@reactioncommerce/nodemailer": "^5.0.5",
"accounting-js": "^1.1.1",
"authorize-net": "^1.1.1",
Expand Down Expand Up @@ -85,7 +85,7 @@
"react-avatar": "^2.5.1",
"react-color": "^2.13.8",
"react-copy-to-clipboard": "^5.0.1",
"react-dates": "^15.5.3",
"react-dates": "^16.3.6",
"react-dnd": "^2.5.4",
"react-dnd-html5-backend": "^2.5.4",
"react-dom": "16.2.0",
Expand Down

0 comments on commit 9f7fb22

Please sign in to comment.