daveinsurgent
Newbie
Posts: 1
Registered: 2/1/2010
Location: Canada
Member Is Offline
|
| posted on 2/1/2010 at 06:05 PM |
|
|
Idea
I needed to use a different directory for images. I specified the optional parameter, and I started getting undefined errors (months was
undefined).
I modified/added this block to the constructor
| Code: |
if (!a_tpl)
a_tpl = A_TCALDEF;
else {
for (var key in A_TCALDEF) {
if (!a_tpl[key]) {
a_tpl[key] = A_TCALDEF[key];
}
}
}
|
So if I specify a_tpl but not all the customizations (e.g. just the imgpath) it will still pull the defaults from A_TECALDEF.
Hope this helps.
|
|
|
paladin
Junior Member
Posts: 3
Registered: 5/5/2010
Location: Indianapolis IN USA
Member Is Offline
|
| posted on 5/6/2010 at 08:05 AM |
|
|
Re: Idea
I needed to set the image directory in my project as well. This is how I did it - preset A_TCALDEF.imgpath.
<SCRIPT type="text/javaScript" src="$SCR_PATH/calendar_dbx.js"></script>
:
:
<script...>
A_TCALDEF.imgpath = '../../img/';
var oSTARTDATE; // to hold date object ref when created...
</script>
:
:
<td>
<input class="dateInput" type="text" name="startdate" id="startdate" value="" />
<script type="text/javascript" language="javascript">
oSTARTDATE = new tcal ( { 'formname': 'PAGEFORM'
, 'controlname': 'startdate'} );
</script>
</td>
:
:
|
|
|