jquense / react-big-calendar

gcal/outlook like calendar component
http://jquense.github.io/react-big-calendar/examples/index.html
MIT License
7.88k stars 2.23k forks source link

disable "All day" row #203

Closed KnockNow closed 8 years ago

KnockNow commented 8 years ago

Hi, thank you for this library ! i want disable the display of the line "all day", how can i do pls ? And i have a problem with the view. I can't disable two view (day and aganda)...

mawek commented 8 years ago

you can pass views property to the BigCalendar component

<BigCalendar events={events} views={['week', 'day']} defaultView='week'/>
KnockNow commented 8 years ago

Thank you but i want disable the row "All day", is that possible ?

jquense commented 8 years ago

its not currently possible to disable the all day view, in part because there would be no way of showing events that span multiple days (even if they aren't marked all day), as @mawek points out you can adjust the vies you want with the views prop

mcmatan commented 7 years ago

Is there a way of currently removing this line? Maybe with css?

KnockNow commented 7 years ago

Yes, I have sucessfully done it but not with css (it's not possible because that line have a dependency). You can fork this lib and just comment the code that does this. (And why not create a parameter for enable/disable that line). Good luck !

mcmatan commented 7 years ago

Yeah that's what I had in mind, thanks! (:

mcmatan commented 7 years ago

Did it with CSS! Boom!


.rbc-time-view .rbc-row {
    min-height: 0px;
}

.rbc-time-view .rbc-row div:nth-child(1) {
    height: 0px !important;
}
tkporter commented 7 years ago

For anyone else looking to use @mcmatan's solution, you can use that and set the allDay message to '': http://intljusticemission.github.io/react-big-calendar/examples/index.html#prop-messages

darrenklein commented 7 years ago

Using version 0.16.1, I found this worked:

.rbc-time-header > .rbc-row:nth-of-type(2) {
    display: none !important;
}

This got rid of the 'all day' row in week and day views. Anything wrong with this fix?

drewandrew commented 6 years ago

I used

.rbc-allday-cell {
  display: none;
}
.rbc-time-view .rbc-header {
  border-bottom: none;
}

anything wrong with this (as far as CSS hacks go)?

It would still be nice to disable the allday row altogether. I wonder if a PR that added an option for disabling the allday row, instead opting to display multi-day events with a note (i.e. "cont'd on next day) or an arrow pointing into the next/previous day, would be accepted? Maybe that's a more complex solution than most people need, but currently I have data that will just not be shown because the event would technically be an All Day event.

jquense commented 6 years ago

ya'll you can disable the allday row by setting http://intljusticemission.github.io/react-big-calendar/examples/index.html#prop-showMultiDayTimes

sedenardi commented 5 years ago

@jquense Hi Jason, I'm trying to disable the allday row using showMultiDayTimes and not getting it. Here's a basic example where specifying showMultiDayTimes is expected to make the allday row disappear. Can you let me know where I'm going wrong?

https://codesandbox.io/s/3q8mrk9l7q

flolege commented 5 years ago

Is there any new development? @jquense suggested solution does not work for me either. It basically seems feasible, the first Basic example shows that.

sedenardi commented 5 years ago

I ended up doing it via CSS mentioned by @drewandrew.