Can we make the day close at 2 AM ? Entertainment center calendar

117 views
Skip to first unread message

Martin

unread,
Apr 27, 2011, 12:31:30 PM4/27/11
to jquery week calendar
Hi all,
I've faced a new challenge trying to modify this since I'm trying to
make a calendar for an entertainment center where an event can also be
from 1:30 until 2:30, it can already start after midnight.

I found out that a day can be forced to have more than 24 hours like
this:

"businessHours":{"start":10, "end":27}


But then of course I need to be able to supply a valid end date in the
event like:

events : ["start": "2011-04-27T24:00", "end": "2011-04-28T02:00"]

and it should be rendered in the day 27 from 24 to 26 hours (0 to
2AM).

Did someone already faced this one for events that are past midnight ?
Is my logic correct or I will end up with a whole mess ?

If I find the solution I will post it again here. If someone proves my
intentions are wrong please comment!

Martin

unread,
May 2, 2011, 4:38:21 AM5/2/11
to jquery week calendar
Found a way to display some hours from the next day when a event is
from 23 something up to 3 in the morning:

http://comparasuper.com/t/i/calendarsample.gif

But is not really the solution I want since it will work only for
events starting before 24 hrs of the current day.
I know it sounds a bit cumbersome but if the entertainment center
opens from 11 to 3 Am it makes sense that the day shows that 16 hours
of opening time in the same day.

So I'm looking now at what functions need to be rewritten, but is not
easy since all is built around valid dates with the Date object, so it
will take some time. If anyone wants to follow what I'm doing let me
know, since maybe there is a better solution I didn't think about, and
makes some of my hair stay in place :)

Shawn L

unread,
Jun 29, 2012, 12:07:11 AM6/29/12
to jquery-wee...@googlegroups.com
Martin,

Have you found a workaround for this? I need to do something similar and began searching the forums.

Regarding your comment: "all is built around valid dates with the Date object", does anyone think it'll be a good idea to modify the Date class so that a time like 26:00 is a valid time?
Reply all
Reply to author
Forward
0 new messages