Editable schedule - problem with hours

Components, Ajax Framework, Utilities and More.
Post Reply
Posts: 2
Joined: 04 Aug 2011, 22:01

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:

Code: Select all

	<p:schedule value="#{scheduleController.eventModel}" editable="true"
		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}" />

					<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}" />

					<h:outputLabel id="allDayLabel" value="All day"/>
					<h:selectBooleanCheckbox id="allDayCb" >
						<p:ajax update="eventDetails" listener="#{dialogBean.updateHours}" />
					<p:commandButton value="Save" actionListener="#{scheduleController.addEvent}"
					oncomplete="myschedule.update();eventDialog.hide();" />
(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.

Posts: 1
Joined: 17 Aug 2011, 03:46

17 Aug 2011, 03:56

Try create the event with the FALSE full-day argument (argument #4)... something like this:

Code: Select all

                eventModel.addEvent(new DefaultScheduleEvent("Champions League Match", previousDay8Pm(), previousDay11Pm(), false));

Posts: 2
Joined: 04 Aug 2011, 22:01

17 Aug 2011, 21:15

Thanks for your hint, unfortunately it doesn't seem to have any effect - when I change start hour in existing event, save and reopen it, start hour is the same as end hour. I cannot find any corresponding example for schedule with hour input fields so I'm kinda short of ideas..

Post Reply
  • Information
  • Who is online

    Users browsing this forum: Google [Bot] and 9 guests