calendarxp Site Admin
Joined: 30 Jan 2005 Posts: 409
|
Posted: Tue Feb 15, 2005 7:37 pm Post subject: [PopCalendarXP]How to create multiple datepickers with different look and feel in one page? |
|
|
Although most of the time only 1 calendar engine tag (iframe) is required in 1 page, sometimes we need 2 or more date pickers with different behaviors (plugin) or looks (theme/agenda). To get them working, we need to:
- Use 2 calendar iframe tags at the page bottom instead of 1, and name (id) them each with an unique context name (aka. naming space). e.g.
Code: | "gToday:normal:agenda.js:gfPop1:plugins1.js" | and Code: | "gToday:mini:agenda.js:gfPop2:plugins2.js" |
Change the trigger code to call them correspondingly. e.g. Code: | if(self.gfPop1)gfPop1.fPopCalendar(...) | and Code: | if(self.gfPop2)gfPop2.fPopCalendar(...) |
(Optional) Modify the plugins1.js and plugins2.js accordingly so as to have different behaviors.
This way, you can have one picker with format "YYYYMMDD" and the other with "DD/MM/YYYY", preferrably with different looks. You can even have different agendas assigned to each calendar if you like - just name them separately as agenda1.js and agenda2.js. All can happen in the same page.
_________________ Copyright 2003-2011 Idemfactor Solutions, Inc. All rights reserved. |
|