CalendarXP.net Support Forum Index CalendarXP.net Support
Most forums here are private and invisible to public.
 
 FAQFAQ   SearchSearch   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

[PopCalendarXP]How to create multiple datepickers with different look and feel in one page?

 
Post new topic   Reply to topic    CalendarXP.net Support Forum Index -> CalendarXP F.A.Q.
View previous topic :: View next topic  
Author Message
calendarxp
Site Admin


Joined: 30 Jan 2005
Posts: 409

PostPosted: Tue Feb 15, 2005 7:37 pm    Post subject: [PopCalendarXP]How to create multiple datepickers with different look and feel in one page? Reply with quote

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:

  1. 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"

  2. Change the trigger code to call them correspondingly. e.g.
    Code:
     if(self.gfPop1)gfPop1.fPopCalendar(...)
    and
    Code:
     if(self.gfPop2)gfPop2.fPopCalendar(...)

  3. (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.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    CalendarXP.net Support Forum Index -> CalendarXP F.A.Q. All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum


Copyright 2003- Idemfactor Solutions, Inc. All rights reserved.
Powered by phpBB © 2001, 2005 phpBB Group