View previous topic :: View next topic |
Author |
Message |
tspcenter
Joined: 25 Jul 2008 Posts: 4
|
Posted: Wed Oct 01, 2008 7:24 pm Post subject: dynamic range with fStartPop |
|
|
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 |
|
|
calendarxp Site Admin
Joined: 30 Jan 2005 Posts: 409
|
Posted: Sat Oct 04, 2008 5:24 pm Post subject: |
|
|
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 |
|
|
tspcenter
Joined: 25 Jul 2008 Posts: 4
|
Posted: Tue Oct 07, 2008 12:49 pm Post subject: |
|
|
This worked great.
Thank you.
|
|
Back to top |
|
|
|