How to hide time-slots in “agendaWeek” View of FullCalendar/Primefaces <p:schedule>?

a 夏天 提交于 2019-12-24 09:19:11

问题


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


回答1:


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
}



回答2:


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!




回答3:


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

     <p:schedule id="mySechedule" 
rightHeaderTemplate="month, basicWeek, basicDay" 
value="#{myBean.eventModel}"/>



回答4:


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!



来源:https://stackoverflow.com/questions/12856449/how-to-hide-time-slots-in-agendaweek-view-of-fullcalendar-primefaces-pschedu

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!