Scheduler Hotel Tutorial


I have been going through the scheduler hotel tutorial

I am having difficulties reducing the timespan of the view to 7 days. It is my understanding that i must change the value of timeline.X_size = 7

But whatever value i put in it always results in the view showing a full month of days.

Any help would be greatly appreciated

in this demo number of columns in timeline is dynamically overriden by a client-side code, since months have different number of days.
So in order to disable it and use X_Size config in regular way, you need to rid of this code block

thanks for your reply.

i removed the code block and tested again but it is still showing a full month regardless of x_size

Please attach a demo. Timeline scale configuration may come either from server side config (X_Size, etc) or from client side (scheduler.matrix.Timeline.x_size), seems like one of these is overriden somewhere in your project

here is a link to a demo

it is exactly the same as the tutorial downloaded, except x_size is changed and the other method you refered to earlier has also been commented out.


make sure that JS file is not cached in browser, the simplest way is to add some parameter to script url:[code]

When I run it locally the timeline shows 7 days as expected.
One thing you may want to change, is to make sure that timeline shows days starting from Monday, =;

Thanks alot Aliaksandr, that was the problem all along hehe