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

No longer hiding the header when we only show one day #1019

Merged
merged 2 commits into from
Nov 7, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
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
13 changes: 7 additions & 6 deletions src/TimeGridHeader.js
Original file line number Diff line number Diff line change
Expand Up @@ -175,12 +175,13 @@ class TimeGridHeader extends React.Component {
</div>
</div>
)}
{/* For rendering only one day no need to show the headers */}
{range.length > 1 && (
<div className="rbc-row rbc-time-header-cell">
{this.renderHeaderCells(range)}
</div>
)}
<div
className={`rbc-row rbc-time-header-cell${
range.length <= 1 ? ' rbc-time-header-cell-single-day' : ''
}`}
>
{this.renderHeaderCells(range)}
</div>
<DateContentRow
isAllDay
rtl={rtl}
Expand Down
4 changes: 4 additions & 0 deletions src/less/time-column.less
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,10 @@
flex-basis: 0px;
}

.rbc-time-header-cell-single-day {
display: none;
}

.rbc-day-slot {
min-width: 140px;
}
Expand Down
4 changes: 4 additions & 0 deletions src/less/time-grid.less
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,10 @@
// }
}

.rbc-time-header-cell-single-day {
display: none;
}

.rbc-time-header-content {
flex: 1;
display: flex;
Expand Down