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 

Starting Date from a Control Box in a form using a single theme instead of date range

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



Joined: 18 Dec 2008
Posts: 9

PostPosted: 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 Reply with quote

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
View user's profile Send private message
calendarxp
Site Admin


Joined: 30 Jan 2005
Posts: 409

PostPosted: Tue Jan 27, 2009 10:10 pm    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    CalendarXP.net Support Forum Index -> PopCalendarXP samples 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