Issue 1593: Improper render on custom view
Status:  Duplicate
Merged:  issue 692
Owner: ----
Closed:  Aug 2013
Reported by forward...@gmail.com, Oct 30, 2012
I tried to create a three day view by cloning the week view and setting it to render 3 days instead of 7. This causes events to render incorrectly, with this as the usual pattern: third day moved to first day, first to second and second to third. 

Three days is a more concise method for displaying information on smaller screens so this may be a feature worth adding to the next version. I'll continue to look into the cause of the error and more information can be provided.
Oct 30, 2012
#1 forward...@gmail.com
To clarify, my view was modeled after basic week, not agenda.
Oct 30, 2012
#2 forward...@gmail.com
http://imgur.com/a/EMMuY

Hopefully an image can help explain the issue better than words.
Oct 31, 2012
#4 forward...@gmail.com
Fixed my issue! The solution is a bit hacky so if anyone else after me has the same issue, here is the solution I used:

I found that the events rendered incorrectly because they were trying to align their day value (0-6) with that value on the calendar. If you had an event on friday in a 3 day view it would show up on the second slot. I fixed this by setting the firstDay option each time the calendar loaded a new 3day view (viewDisplay callback). There was still an error rendering weekend events (completely baffled me) so instead of fixing the root cause I edited the events after rendering (element.context.style.width= (view.getColWidth() - 7) + "px"). Hope this helps someone!

Apr 4, 2013
#5 sivn...@gmail.com
based on your idea i cloned the AgendaWeekView, named it AgendaThreeDayView, and changed end to be 3 days after start. It has no problem with the position it renders the events, but there is an other problem i came across. When i first click "3 days" to go to 3 day view it shows no events. If i click left or right to go to the next/previous 3 days it renders everything fine, even the events that in the first place were missing. Cannot find what is missing on rendering, and one other part i miss is if at  "AgendaView.call(t, element, calendar, 'agendaWeek');" i have to change "agendaWeek" to something else, like "agendaThreeDays" or leave it as it is...


Apr 5, 2013
#6 sivn...@gmail.com
ok, i had to change "agendaWeek" to something else, like "threeDay", and update titleFormat and columnFormat as well to support the new view. It works fine but still exists the problem that events are not render till i click previus or next button. After that everything is ok. If anyone has any idea why this happens, please share :)
Aug 15, 2013
Project Member #7 adamrs...@gmail.com
merging with a related issue, that proposes a built-in solution...
Status: Duplicate
Mergedinto: 692