Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add the possibility to get selected range label for defined range component #530

Open
wants to merge 15 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix: check start/end dates are not null in `rendering selection pla…
…ceholders` func in `day cell` component
  • Loading branch information
atefBB committed Nov 8, 2021
commit f5877417b66aa54e361f91ff0d819bf80c70a004
1 change: 1 addition & 0 deletions src/components/DayCell/index.js
Original file line number Diff line number Diff line change
@@ -114,6 +114,7 @@ class DayCell extends Component {
const inRanges = ranges.reduce((result, range) => {
let startDate = range.startDate;
let endDate = range.endDate;
if (startDate === null || endDate === null) return result;
if (startDate && endDate && isBefore(endDate, startDate)) {
[startDate, endDate] = [endDate, startDate];
}