week view headers misaligned with day columns
See original GitHub issueDo you want to request a feature or report a bug?
Bug report
What’s the current behavior?
on:
"react-big-calendar": "^0.20.2"
"react": "^16.5.2",
"react-ace": "^5.8.0",
Week view (and day view on narrow screens) has completely misaligned headers with the day columns
What’s the expected behavior?
The headers are aligned like in this sandbox
I looked at the markup differences between the sandbox and my code and here is an image showing it: with the main differences highlighted.
Aside from the rbc-overflowing
class being added the to the top level header component there are a number of markup differences in the structure as well.
The code for init is:
<Paper style={{marginTop: 10, height: '85vh'}}>
<BigCalendar
drilldownView="agenda"
// onEventDrop={this.moveEvent}
events={events || api[showing].data()}
onSelectEvent={ (event) => api[showing].navigator(push)(event)}
defaultView='month'
scrollToTime={moment().toDate()}
eventPropGetter={(event,start,end,isSelected)=>{
return {
style: {
backgroundColor:'transparent',
color: Colors.primary,
borderRadius:0,
border: 'none',
whiteSpace: 'pre-wrap',
overflowY: 'auto'
}
}
}}
components={{
event: this.Event,
agenda: {
event: this.EventAgenda
},
toolbar: CustomToolbar,
}}
/>
</Paper>
Issue Analytics
- State:
- Created 5 years ago
- Comments:10
Top Results From Across the Web
week view headers misaligned with day columns · Issue #1129
Week view (and day view on narrow screens) has completely misaligned headers with the day columns image. What's the expected behavior?
Read more >Why are these HTML column headers misaligned?
a sticky header, with dynamic column widths (no declared table ... I got the borders to align by removing the display:block properties.
Read more >Solved: How to work with columns that are not aligned
Solved: Hi community I have a large set of data with columns not aligned. Please could I know how to align these ....
Read more >Grid Header Alignment Problem While Fixed Header - Telerik
I had static headers set to true and all visible columns had pixel widths. But I was getting the column values not aligned...
Read more >trying to fix column misalignment between row headers and ...
You can see the issue by scrolling to the right. When Bootstrap is being used and I scroll all the way to the...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I managed to run into this by creating a RBC demo in CRA. The reproduction is as follows:
App.tsx
with the following code:Upon loading the page, the day column headers will be completely off screen. Switching the view to month and back fixes that. This might be a different issue that manifests the same way.
Please reopen this @buddythumbs as in my case this issue doesn’t seem to be fixable by removing the surrounding container (I do need to keep at least one
div
as React won’t allow me to render tobody
directly) and it reproduces consistently.I’m still having the issue. As for @TomasHubelbauer I can’t remove the surrounding block and because of this I can’t update my header. Any fix?
EDIT: For anone having this issue and using Material-UI with React. You can configure your calendar container to be astyled component and override the react-big-calendar there: