Use dynamic instead of predefined users

158 views
Skip to first unread message

Chris Broughton

unread,
Oct 12, 2012, 4:12:04 PM10/12/12
to jquery-wee...@googlegroups.com
I'm trying to create a room reservation system like a few of you I'm sure. I have a list of the available room in a tree on the left of my screen and when I check one to enable it I want to see it's calendar on the right. Previously I'd just been creating a new calendar instance for each visible room. It seems like this should be accomplished through the multi-user portion though.

I can't figure out though how to have the users: option be dynamic. In that I don't want to have to list all the available rooms and I don't want blank columns for rooms the user isn't interested in.

I have tried using a function that returns an array instead of defining the array directly but that doesn't work.

users: function(){return new Array('room1', 'room2', 'room3', 'room4')}
instead of
user: ['room1', 'room2', 'room3', 'room4']


Are there any suggestions on a way of doing this?
Thanks for the help.

NoobCoder

unread,
Feb 5, 2016, 11:28:24 PM2/5/16
to jquery week calendar
I used your post as starting point and i found it useful. so here is what i came up

function uuu(){
        return new Array('room1', 'room2', 'room3', 'room4');
        }

from that function you can use that on the user options like this:

users: uuu(),

and it will work...
Reply all
Reply to author
Forward
0 new messages