javascript - How to set PAGES property in YAHOO.widget.CalendarGroup for different case? -


i meet problem when doing yahoo.widget.calendargroup.
want this, if page widtha less 720px, calendargroup pages property 1
enter image description here,
if more 720px, calendargroup use default pages property 2enter image description here.
use

mycalendar.cfg.setproperty("pages",1); 

but doesn't work, found in document here: http://developer.yahoo.com/yui/docs/yahoo.widget.calendargroup.html#config_pages

pages - number number of pages include in calendargroup. value can set once, in calendargroup's constructor arguments. default value: 2

seems can't change pages property after initicalization. how change pages based on change of browser width? thanks.

as says: "this value can set once, in calendargroup's constructor arguments". use constructor, this:

var mycalobject = new yahoo.widget.calendargroup(     calobject,      calobject + "container",      { pages: 2, close: true, iframe: false } ); 

Comments

Popular posts from this blog

c# - Operator '==' incompatible with operand types 'Guid' and 'Guid' using DynamicExpression.ParseLambda<T, bool> -