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 

Combining Date and DateTime calendars

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



Joined: 11 Jan 2010
Posts: 1

PostPosted: Thu Jan 14, 2010 10:00 am    Post subject: Combining Date and DateTime calendars Reply with quote

Hello

I have to be able to use both Date pickers and DateTime pickers in the same web application.

I have started off from the demos/HelloWorld sample, and i have successfully been able to make this sample work. I also have added an extra date field for testing, and all seems to be working just fine.

But now i also, in the same page, must add two new fields. This time with date AND time.

So, how would i continue from here to make this happen?
The DateTime format must be yyyy-mm-dd hh:mm

Renamed HelloWorldDemo.htm to index.htm, and this is what it looks like right now:
Code:

<HTML>
<HEAD><TITLE>Hello World!</TITLE>
<link href="cal/normal.css" rel="stylesheet" type="text/css" />
<style type="text/css">
html {
   font-family:verdana;
   font-size:0.8em;
}
</style>
</HEAD>
<BODY>



<FORM name="demoform">
Date Field1: <a name="dcdummy:27"><input name="dc1" id="dc1" value="" size="11"></a><a href="javascript:void(0)" onclick="if(self.gfPop)gfPop.fPopCalendar(document.demoform.dc1);return false;" ><img class="PopcalTrigger" align="absmiddle" src="Cal/calendar.gif" width="16" height="15" border="0" alt=""></a>
<br />
Date Field2: <a name="dcdummy:28"><input name="dc2" id="dc2" value="" size="11"></a><a href="javascript:void(0)" onclick="if(self.gfPop)gfPop.fPopCalendar(document.demoform.dc2);return false;" ><img class="PopcalTrigger" align="absmiddle" src="Cal/calendar.gif" width="16" height="15" border="0" alt=""></a>
<hr />
Date Time Field1:
<br />
Date Time Field2:
</FORM>




<!--  PopCalendar(tag name and id must match) Tags should not be enclosed in tags other than the html body tag. -->
<iframe width=174 height=189 name="gToday:normal:agenda.js" id="gToday:normal:agenda.js" src="cal/ipopeng.htm" scrolling="no" frameborder="0" style="visibility:visible; z-index:999; position:absolute; top:-500px; left:-500px;">
<layer name="gToday:normal:agenda.js" src="cal/npopeng.htm" background="cal/npopeng.htm">     </layer>
</iframe>
</BODY>
</HTML>



(I also have made some adjustments in the normal.js file, to make it suite my swedish environment better.)
Code:
Changed normal.js:

var gsSplit="/";      ->      var gsSplit="-";
var giDatePos=0;      ->      var giDatePos=2;

Changed:
var gMonths=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];
To
var gMonths=["Jan","Feb","Mar","Apr","Maj","Jun","Jul","Aug","Sep","Okt","Nov","Dec"];

Changed:
var gWeekDay=["Su","Mo","Tu","We","Th","Fr","Sa"];
To
var gWeekDay = ["S&ouml;", "M&aring;", "Ti", "On", "To", "Fr", "L&ouml;"];



var gEnd=[2030,12,31];      ->      var gEnd=[2040,12,31];
var gsTodayTip="Today";      ->      var gsTodayTip="Idag";
Back to top
View user's profile Send private message
calendarxp
Site Admin


Joined: 30 Jan 2005
Posts: 409

PostPosted: Thu Jan 14, 2010 12:29 pm    Post subject: Reply with quote

To combine both you should start with the datetime theme. Then add the hello world tags to it - note that you will have 2 iframe tags one for each theme.

Please search in the FAQ for a sample on having different themes coexist on the same page.

_________________
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 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