| LGA 
 
 
 Joined: 11 Jan 2010
 Posts: 1
 
 
 | 
			
				|  Posted: Thu Jan 14, 2010 10:00 am    Post subject: Combining Date and DateTime calendars |   |  
				| 
 |  
				| 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ö", "Må", "Ti", "On", "To", "Fr", "Lö"];
 
 
 
 var gEnd=[2030,12,31];      ->      var gEnd=[2040,12,31];
 var gsTodayTip="Today";      ->      var gsTodayTip="Idag";
 
 | 
 |  |