Editable schedule - problem with hours
Posted: 11 Aug 2011, 15:00
Hi there
My problem is about basic schedule functionality which is adding events. I'd like to set start hour and end hour for each non all-day event, thus I have:
(updateHours does nothing but disables date/hour input fields)
if event is created from day view, start hour is properly set to the hour I clicked, but after Save the event is registered under all day events at the top of the day. When opened to edit, the hour is also remembered correctly, only it's not displayed under corresponding hour but as all day event... Also while adding event from month view, if I set hours manually, they are not remembered at all...
Any ideas would be greatly appreciated.
My problem is about basic schedule functionality which is adding events. I'd like to set start hour and end hour for each non all-day event, thus I have:
Code: Select all
<p:schedule value="#{scheduleController.eventModel}" editable="true"
widgetVar="myschedule"
eventSelectListener="#{scheduleController.onEventSelect}"
dateSelectListener="#{scheduleController.onDateSelect}"
onEventSelectUpdate="eventDetails" onEventSelectComplete="eventDialog.show()"
onDateSelectUpdate="eventDetails" onDateSelectComplete="eventDialog.show()" />
<p:dialog id="dialog" widgetVar="eventDialog" header="Event"
showEffect="clip" hideEffect="clip">
<h:panelGrid id="eventDetails" columns="2">
<h:outputLabel for="title" value="Name" />
<h:inputText id="title" value="#{scheduleController.event.title}" required="true"/>
<h:outputLabel id="idStart" value="#{dialogBean.meetingStart}:" />
<p:inputMask id="from" value="#{scheduleController.event.startDate}" mask="99/99/9999 99:99" >
<f:convertDateTime pattern="dd/MM/yyyy HH:mm" timeZone="#{scheduleController.timezone}" />
</p:inputMask>
<h:outputLabel id="idEnd" value="#{dialogBean.meetingEnd}:" />
<p:inputMask id="idEndInput" value="#{scheduleController.event.endDate}" mask="99/99/9999 99:99" disabled="#{dialogBean.disabled}">
<f:convertDateTime pattern="dd/MM/yyyy 23:59" timeZone="#{scheduleController.timezone}" />
</p:inputMask>
<h:outputLabel id="allDayLabel" value="All day"/>
<h:selectBooleanCheckbox id="allDayCb" >
<p:ajax update="eventDetails" listener="#{dialogBean.updateHours}" />
</h:selectBooleanCheckbox>
<p:commandButton value="Save" actionListener="#{scheduleController.addEvent}"
oncomplete="myschedule.update();eventDialog.hide();" />
</h:panelGrid>
</p:dialog>
if event is created from day view, start hour is properly set to the hour I clicked, but after Save the event is registered under all day events at the top of the day. When opened to edit, the hour is also remembered correctly, only it's not displayed under corresponding hour but as all day event... Also while adding event from month view, if I set hours manually, they are not remembered at all...
Any ideas would be greatly appreciated.