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 can I pre-select a date and format it in the corresponding date field?

 
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:42 pm    Post subject: [PopCalendarXP]How can I pre-select a date and format it in the corresponding date field? Reply with quote

You'll need the following function and have to call it from the onload event of your html body tag. And that's because the calendar engine reference (gfPop) will not be available until the page is fully loaded. e.g. The following code preset the datefield1 with date Dec 10, 2005, whose format depends on the theme being used:
Code:
<body onload="fPresetDate(document.form1.datefield1,2005,12,10);">
<script>
function fPresetDate(field,y,m,d) {
  field.value=gfPop.fFormatInput(y,m,d);
}
</script>

Of course, you can also replace the preset date (2005,12,10) with server-side generated variables, using either ASP, JSP or PHP etc.

_________________
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