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 

dynamic range with fStartPop

 
Post new topic   Reply to topic    CalendarXP.net Support Forum Index -> PopCalendarXP Related
View previous topic :: View next topic  
Author Message
tspcenter



Joined: 25 Jul 2008
Posts: 4

PostPosted: Wed Oct 01, 2008 7:24 pm    Post subject: dynamic range with fStartPop Reply with quote

Hello, I followed your dynamic range example at http://www.calendarxp.net/forum/viewtopic.php?t=84 for PopCalendarXP. When using gfPop.fPopCalendar it works great. Can I pass dynamic start date to gfPop.fStartPop as well?

I need to pass dynamic start date to gfPop.fStartPop in the following example which is similar to your date range example:

<input class="dateRange" name="dc1" value="{$startDate}" size="9" onfocus="this.blur()" readonly></a><a href="javascript:void(0)" onclick="if(self.gfPop)gfPop.fStartPop(document.tspReturns.dc1,document.tspReturns.dc2);return false;" ><img class="PopcalTrigger" align="absmiddle" src="includes/calendar/DateRange/calbtn.gif" width="34" height="22" border="0" alt=""></a>
Back to top
View user's profile Send private message
calendarxp
Site Admin


Joined: 30 Jan 2005
Posts: 409

PostPosted: Sat Oct 04, 2008 5:24 pm    Post subject: Reply with quote

If you look at the plugins.js file for the code source of the fStartPop() function, you will find it actually uses the fPopCalendar() call and the dynamic range functionality to restrict the start date and end date.

So if you want to do anything extra, you may just modify the fStartPop() to take additional parameters and then pass them into the fPopCalendar() call in the plugins.js. e.g.
Code:
function fStartPop(startc,endc, param1) {
  _startc=startc;
  _endc=endc;
  var sd=fParseInput(endc.value);
  if (!sd) sd=gEnd;
  fPopCalendar(startc, [param1,sd,sd]);
}

_________________
Copyright 2003-2011 Idemfactor Solutions, Inc. All rights reserved.
Back to top
View user's profile Send private message
tspcenter



Joined: 25 Jul 2008
Posts: 4

PostPosted: Tue Oct 07, 2008 12:49 pm    Post subject: Reply with quote

This worked great.

Thank you.
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 -> PopCalendarXP Related 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