Event without end

Hi !

I have (once again) a problem with event parsing. In my application, I’ve data without duration, and so database send me the same end_date that the start_date.
Here the example :

	<event id="A4U0YF6D30P7K79A00DP">
		<start_date>2010-07-09 08:00:00</start_date>
		<end_date>2010-07-09 08:00:00</end_date>
		<text>PHONE CALL</text>
		<details>Call meeting with Mr John</details>
	<event id="A4U0YJOIR0P7K79A00EM">
		<start_date>2010-07-09 08:00:00</start_date>
		<end_date>2010-07-09 17:00:00</end_date>
		<text>Skype Meeting </text>
		<details>Call Norway client</details>
	<event id="A4U0YM41D0P7K79A00HL">
		<start_date>2010-07-09 08:00:00</start_date>
		<end_date>2010-07-09 10:00:00</end_date>
		<text>TO DO</text>
		<details>2008 Server config</details>

My problem is, in the scheduler, the event without duration is hidden behind the others events, and not beside them (see attachment).

Is there a trick to fix it ?

Event must have some length, to be rendered correctly.
If you can’t change data, you can add the next code to scheduler’s init

scheduler.attachEvent("onEventLoading", function(ev){ if (ev.start_date.valueOf() == ev.end_date.valueOf()){ ev.end_date = scheduler.date.add(ev.start_date, scheduler.config.time_step, "minute"); } return true; })

As result some default length will be assigned to events.

Thanks for the reply. (members > don’t forget to add ev as parameter to the function)

In fact this code will also change the shown hour… But yes it fixes the problem, so maybe i can find a trick

Above code snippet updated ( typo with “ev” fixed)

In fact this code will also change the shown hour
You can do any other date updating in the similar way, the only requirement - start time must be lesser than end time.