|
CalendarXP.net Support Most forums here are private and invisible to public.
|
View previous topic :: View next topic |
Author |
Message |
tonydeleon
Joined: 18 Dec 2008 Posts: 9
|
Posted: Tue Jan 27, 2009 6:26 pm Post subject: Starting Date from a Control Box in a form using a single theme instead of date range |
|
|
Hello
This code works using daterange, I’m using it and it’s working fine with OulookTwin, but which code can I use for a single calendar like “Normal” or Supermini theme ?
From your forum:
A good example in reality is that some people used the date range demo and wanted to limit the begin date to the existing value in another input box - it's just as easy as going into the plugins.js file, find the the definition of fStartPop() and modify it to be the following:
Code:
function fStartPop(startc,endc) {
_startc=startc;
_endc=endc;
var sd=fParseInput(endc.value);
if (!sd) sd=gEnd;
var beginDate=fParseInput(gContainer.document.getElementById("id_of_the_input_tag").value);
if (!beginDate) beginDate=gBegin;
fPopCalendar(startc, [beginDate,sd,beginDate]);
}
|
|
Back to top |
|
|
calendarxp Site Admin
Joined: 30 Jan 2005 Posts: 409
|
Posted: Tue Jan 27, 2009 10:10 pm Post subject: |
|
|
The code you described is used in plugins.js and should work with any theme - you just need to copy the fStartPop() and fEndPop() codes to your plugins.js and then instead of directly call fPopCalendar(), call fStartPop() from the start date input box and call fEndPop() from the end date input box.
If you have more doubts, please post the details (with some sample code) in the "PopCalendarXP related" forum as the sample forum is not used for answer questions.
http://www.calendarxp.net/forum/viewforum.php?f=3
_________________ Copyright 2003-2011 Idemfactor Solutions, Inc. All rights reserved. |
|
Back to top |
|
|
|
|
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
|