2

Is it possible to hide the time-slots in "agendaWeek" View? I'm using Primefaces <p:schedule> which based on the FullCalendar. I only add AllDay-Events to this specfic schedule, so my client decided to hide the time-slots.

I hope there is a way.

Best regards

commandcraxx
  • 243
  • 1
  • 7
  • 23

4 Answers4

4

Can't you just use the basicDay and basicWeek views? Rather than agendaWeek/agendaDay? Those two views don't show the time-slots..... Saves messing around with the CSS etc!

Erve1879
  • 845
  • 1
  • 14
  • 26
1

customize the header template it will save you tons of css altering.

     <p:schedule id="mySechedule" 
rightHeaderTemplate="month, basicWeek, basicDay" 
value="#{myBean.eventModel}"/>
Mustafa
  • 443
  • 1
  • 4
  • 15
0

not sure if that's what you mean

but to hide the first column in schedule try this css selector (remove formID\3A if you got prependId = "false" in your form that contains the scheduler )

#formID\3A scheduleID th.fc-agenda-axis{
    display:none
}

or run this js code (tested on primefaces showcase)

jQuery("th.fc-agenda-axis").hide()

Update

This is how to hide the time slots (what the OP was really looking for)

#formID\3A scheduleID table.fc-agenda-slots{
    display:none
}
Daniel
  • 36,833
  • 10
  • 119
  • 200
  • Hm, it seems not working for me. I tried the first one. And the last one. But I'm sure I do something wrong. Where did you place the last solution in your anwser? – commandcraxx Oct 15 '12 at 06:45
  • to rub the jquery , just browse to http://www.primefaces.org/showcase/ui/schedule.jsf and click on week view, than in your chrome/ff open the deve tools with F12 and paste the code in console, havent tried the css selector , but if its not working , try `formID\:AscheduleID th.fc-agenda-axis` `\:` instead of `\3A` or add space between `\3A` and scheduleID – Daniel Oct 15 '12 at 06:49
  • My FormID is "frm_plan" and the scheduleID is "sde_plan" so i add to my css: `frm_plan\:sde_plan th.fc-agenda-axis`. Firebug and Opera doesn't display the schedule anymore and Chrome seems not to understand what i'm defining in my css. It displays the schedule normal. I will add my layout and my schedule page above. – commandcraxx Oct 15 '12 at 07:50
  • i forgot to add `#` before the `formID` , try `#frm_plan\:sde_plan th.fc-agenda-axis` – Daniel Oct 15 '12 at 07:58
  • Thanks, but i mean this: `#frm_plan\:schedule table.fc-agenda-slots` So You can hide the table with all the time slots. `#frm_plan\:schedule table.fc-agenda-axsis` Thanks a lot for your help. Can you make an answer for other who have the same problems like me? – commandcraxx Oct 15 '12 at 08:24
  • By the way, this doesn't work for the M$ IE. I'm will reseach for a solution. (tested with IE9) – commandcraxx Oct 15 '12 at 09:19
  • that's why i initial suggested `\3A` http://stackoverflow.com/questions/122238/handling-a-colon-in-an-element-id-in-a-css-selector , does `#formID\3A scheduleID table.fc-agenda-slots` work better ? Also you can add `prependId="false"` to your form , and use `#scheduleID table.fc-agenda-slots` – Daniel Oct 15 '12 at 09:25
  • Alright, please add to your anwser the IE9 requiered `prependId="false"` and `#scheduleID table.fc-agenda-slots` to get it working. Thanks a lot. – commandcraxx Oct 15 '12 at 09:39
  • doesn't `#frm_plan\3A schedule table.fc-agenda-slots` works for you (without adding `prependId="false"`)? – Daniel Oct 15 '12 at 09:40
  • `#frm_plan\3A schedule table.fc-agenda-slots` also works. I just have two # of these in my css. ;) Removed one and it works. Thanks. – commandcraxx Oct 15 '12 at 09:44
0

To hide the Month-Button, simply use this Code.

<style type="text/css">
.fc-button-month{ display: none; }
</style>

For Week-Button use CSS Selector .fc-button-agendaWeek and for the Day-Button: .fc-button-agendaDay

Regards!

Leonard
  • 783
  • 3
  • 22