[lp_smallMonthlyCalendar]

Description

Link: [lp_smallMonthlyCalendar]
Author: Stiti Samantaray
Category: Calendar
Version: 8.5.x
License: Public Domain
Posted: Dec. 25, 2009
Updated: Jan. 06, 2010
More by this author...

This tag returns a small monthly calendar menu or a date picker. User can change the color theme of the calendar by passing the calendar date cell and day name header colors as parameters to the tag. The tag will return the monthly calendar of the month and year that has been passed in the -calMonth and -calYear parameters to the [lp_smallMonthlyCalendar] tag.

The this tag needs to be called in an IFrame. Please see the sample usage section for the way how to use the date picker.

Parameters

-calMonth integer, optional Two digit integer value of a month of which you want to see the calendar (e.g: -calMonth = 04, 04 stands for the month APRIL)
-calYear integer, optional Four digit integer value of the year of which you want to see the calendar for APRIL(e.g: -calYear = 2009)
-dateCellBgClr string, optional Current month's date cell's background color in the monthly grid (e.g: -dateCellBgClr = '#FFFFFF')
-excludeCellBgClr string, optional Previous/Next month's date cell's background color in the monthly grid (e.g: -excludeCellBgClr = '#E2F0FE')
-weekDayHeader string, optional HTML color code for WeekDay heading in the calendar
-targetDateObjectId string, optional ID of the HTML form input date field (e.g -targetDateObjectId = 'myStartDate'; where "myStartDate" is the ID of the input form field <input type="text" name="startDate" id="myStartDate" value="" />)

Sample Usage

[if: action_param('smallCalendar') == 1]
    [include: 'dropdown_Calendar.inc']
<!-- Initialize you calendar parameters -->
    [Var: 'calMonth' = 01,
        'calYear' = 2010,
        'weekDayHeader'= '#2E75AE',
        'dateCellBgClr' = '#FFFFFF',
        'excludeCellBgClr' = '#E2F0FE']
    
<!-- If Next/Previous Month/Year arrows are clicked -->
    [if: action_param('calMonth')!='']
        [Var: 'calMonth' = Integer(action_param('calMonth'))]
    [/if]
    [if: action_param('calYear')!='']
        [Var: 'calYear' = Integer(action_param('calYear'))]
    [/if]
    
<!-- Load the DatePicker with the Date input fields -->
    [Var: 'myDatePicker' = (lp_smallMonthlyCalendar:  
                            -calMonth = $calMonth,
                            -calYear = $calYear,
                            -weekDayHeader=$weekDayHeader,
                            -dateCellBgClr = $dateCellBgClr,
                            -excludeCellBgClr = $excludeCellBgClr,
                            -targetDateObjectId = action_param('targetDateObjectId'))]
        
    [Var('myDatePicker', -EncodeNone)]
        
    <script language="javascript">
    <!--
        document.getElementById("smallCalendarArea").focus();
    -->
    </script>
[else]

<!-- Attach the DatePicker with the Date input fields -->
    <style type="text/css">
        #smallCalendarStartDate{ position: absolute; height: 110px; width: 153px; display: none; visibility: hidden; text-align: center; opacity:1.00;filter: alpha(opacity=100); -moz-opacity: 1.0; }
        #smallCalendarEndDate{ position: absolute; height: 110px; width: 153px; display: none; visibility: hidden; text-align: center; opacity:1.00;filter: alpha(opacity=100); -moz-opacity: 1.0; }
    </style>
    
    <script language="javascript">
    <!--
        // Drop down the Calendar Menu
        function dropdownCalendar(targetDiv, dateObjectId){
            document.getElementById(targetDiv).style.display = "block";
            document.getElementById(targetDiv).style.visibility = "visible";
            document.getElementById(targetDiv).innerHTML = '<iframe width="100%" height="100%" onBlur="hideCalendarMenu(\''+ targetDiv +'\')" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="?smallCalendar=1&targetDateObjectId=' + dateObjectId + '"></iframe>';
        }
        // Hide Drop down Calendar Menu
        function hideCalendarMenu(targetDiv){
            document.getElementById(targetDiv).style.display = "none";
            document.getElementById(targetDiv).style.visibility = "hidden";
        }
    -->
    </script>
    
    Start Date: <br/>
    <input type="text" name="StartDate" id="StartDate" value="" onclick="dropdownCalendar('smallCalendarStartDate','StartDate');" />
    <br/>
    <div id="smallCalendarStartDate"></div>
    
    End Date: <br/>
    <input type="text" name="EndDate" id="EndDate" value="" onclick="dropdownCalendar('smallCalendarEndDate','EndDate');" />
    <br/>
    <div id="smallCalendarEndDate"></div>
    
[/if]
						

Source Code

Click the "Download" button below to retrieve a copy of this tag, including the complete documentation and sample usage shown on this page. Place the downloaded ".inc" file in your LassoStartup folder, restart Lasso, and you can begin using this tag immediately.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
[//lasso
/*----------------------------------------------------------------------------

[lp_smallMonthlyCalendar]
Returns a monthly calendar menu. Can be used as a datepicker. 

Author: Stiti Samantaray, Mindfire Solutions, Bhubaneswar, India
Last Modified: Dec 25, 2009
License: 

Description:
Returns a monthly calendar.


Sample Usage:
[lp_smallMonthlyCalendar:  
    -calMonth = 04,
    -calYear = 2009,
    -weekDayHeader='#2E75AE',
    -dateCellBgClr = '#FFFFFF',
    -excludeCellBgClr = '#E2F0FE']

Member tags Description: 
-calMonth = Two digit integer value of a month of which you want to see the calendar (e.g: -calMonth = 04, 04 stands for the month APRIL)
-calYear  = Four digit integer value of the year of which you want to see the calendar for APRIL(e.g: -calYear = 2009)
-weekDayHeader = HTML color code for WeekDay heading in the calendar
-dateCellBgClr = Current month's date cell's background color in the monthly grid (e.g: -dateCellBgClr = '#FFFFFF')
-excludeCellBgClr = Previous/Next month's date cell's background color in the monthly grid (e.g: -excludeCellBgClr = '#E2F0FE')
-targetDateObjectId = ID of the HTML form input date field (e.g -targetDateObjectId = 'myStartDate' where "myStartDate" is the ID of the input form field <input type="text" name="startDate" id="myStartDate" value="" />)

----------------------------------------------------------------------------*/

If: !(Lasso_TagExists:'lp_smallMonthlyCalendar'); 
Define_Tag: 'lp_smallMonthlyCalendar', 
    -Optional = 'calMonth', -Type='Integer',
    -Optional = 'calYear', -Type='Integer',
    -Optional = 'weekDayHeader', -Type='String',
    -Optional = 'dateCellBgClr', -Type='String',
    -Optional = 'excludeCellBgClr', -Type='String',
    -Optional = 'targetDateObjectId', -Type='String'; 
 			
    Local( 'calDisplay' = '', //Local variable that holds the monthly calendar.
            'firstDay' = '',
            'lastDate' = '',
            'lastDay' = '',
            'daysCount' = 0,
            'weekRows' = 0,
            'dateIncr' = 0,
            'tempDateIncr' = 0,		
            'rowCounter' = 0,
            'prevMonth' = '',
            'prevYear' = '',
            'prevLastDate' = '',
            'prevDaysCount' = 0,
            'prevDayIncr' = 0,
            'cellDateDay' = 0,
            'cellDate' = '', //Local variable that holds the date of the cells.
            'nextMonth'	= '',
            'nextYear' = '',
            'nextLastDate' = '',
            'nextDaysCount' = 0,
            'nextDayIncr' = 0);

    if( Local('calMonth') == '' );
        Local('calMonth') = Date_Format( Date, -Format='%m' );
    /if;
    if( Local('calYear') == '' );
        Local('calYear') = Date_Format( Date, -Format='%Y' );
    /if;
    if( Local('weekDayHeader') == '' );
        Local('weekDayHeader') = '#2E75AE';
    /if;
    if( Local('dateCellBgClr') == '' );
        Local('dateCellBgClr') = '#FFFFFF';
    /if;
    if( Local('excludeCellBgClr') == '' );
        Local('excludeCellBgClr') = '#E2F0FE';
    /if;
    if( Local('targetDateObjectId') == '' );
        Local('targetDateObjectId') = '';
    /if;
	
// Include CSS styles for the Calendar.
Local: 'calDisplay' = '<style type="text/css">
#dayName p{ font-family: Arial; color: #FFFFFF;	font-size: 80%;	font-weight: bold; }
#navLinks a{ color: #FFFFFF; text-decoration: none; }
#dateCellBody{ vertical-align: absmiddle; border: 0px solid; width: 100%; height: 100%; font-family: Arial; font-weight: bold; color: #000000; font-size: 70%; text-align: center; }
#addActivity a{ color: #6C6C6C; text-decoration: none; }
#addActivity a:hover{	color: #0000FF;	text-decoration: underline; }
.todayCorner{ cursor:default; background-color: #FFFF1F; }
.otherdayCorner{ cursor:default; background-color: ' + Local('excludeCellBgClr') + '; }
.currMonDayCorner{ cursor:default; background-color: ' + Local('dateCellBgClr') + '; }
.activityRow{ height: 5; border-top: 1px dashed #999999; font-family: Arial; color: #000000; font-size: 60%; }
#cellFooter{ text-align: right; }
.dayName { border: 1px outset; font-family: Arial; color: #999999; font-size: 70%; }
.monthName { font-family: Arial; color: #FFFFFF;	font-size: 70%;	font-weight: bold; }
.popupStyle{ font-family: Arial; position: absolute; height: auto; width: 500px; left: 300px; top: 20px; display: none; visibility: hidden; background-color: #FFFFFF; border: 1px solid #7B7B7B;	vertical-align: absmiddle; text-align: center; opacity:1.00;filter: alpha(opacity=100); -moz-opacity: 1.0; }
.transOFF {width: 100%; background-color: #FFFFFF; }
.transON{	font-family: Arial;	position: absolute;	height: 120%;	width: 120%; left: 0;	top: 0;	display: none; visibility: hidden; background-color: #000000;	padding: 1px;	opacity:.60;filter: alpha(opacity=60); -moz-opacity: 0.6; }
#popupTitle{ vertical-align: middle; font-size: 80%; font-weight: bold; color: #FFFFFF; }
#closeBtn a{ vertical-align: middle; font-size: 70%; font-weight: bold; color: #FFFFFF; text-decoration: none; }
#closeBtn a:hover{	vertical-align: middle; font-size: 70%; font-weight: bold; color: #FFFFFF;	text-decoration: underline; }
#activityTitleBar{ background-color: #0A246A }
.activityLabels{ font-family: Arial; color: #000000; font-size: 70%; vertical-align: middle; }
textarea.description { width: 340px; height: 120px; border: 1px solid; font-family: Arial; color: #000000; font-size: 70%; }
INPUT.activityName{ font-family: Arial; color: #000000; font-size: 70%; vertical-align: middle; width: 340px; height: 18px; border: 1px solid;}
INPUT.dateBox{ font-family: Arial; color: #000000; font-size: 70%; vertical-align: middle; width: 60px; height: 18px; border: 1px solid;}
INPUT.timeBox{ font-family: Arial; color: #000000; font-size: 70%; vertical-align: middle; width: 35px; height: 18px; border: 1px solid;}
INPUT.timeAMPM{ font-family: Arial; color: #000000; font-size: 70%; vertical-align: middle; width: 20px; height: 18px; border: 1px solid;}
.downarrow{ background-color: ' + Local('excludeCellBgClr') + '; font-family: Arial; color: #000000; font-size: 70%; font-weight: bold; cursor: default; padding: 0px; height: 18px; text-align: center; vertical-align: middle; border: 1px solid #0055FF; border-left: 0px solid; }
</style>';

// Include JavaScript functions for Add/Edit Activity link.
Local: 'calDisplay' = #calDisplay + '<script language="javascript">
<!--
// Select Date onclick
function selectDate(dateValue)
{
    if("' + #targetDateObjectId + '" != ""){
        if(document.getElementById("' + #targetDateObjectId + '") != null ){
            document.getElementById("' + #targetDateObjectId + '").value = dateValue;
        }else if(window.parent.document.getElementById("' + #targetDateObjectId + '") != null){
            window.parent.document.getElementById("' + #targetDateObjectId + '").value = dateValue;
        }
    }
}
-->
</script>';


Local: 'calDisplay' = #calDisplay + '<div id="calendarContent">';
Local: 'calDisplay' = #calDisplay + '<font size="-1">';

/* Evaluate 1st day of the Selected Month */
Local('firstDay' = Date_Format( Date(#calMonth+'/01/'+#calYear), -Format='%w') );

/* Evaluate last date of the Selected Month */
if( #calMonth == '01' || #calMonth == '03' || #calMonth == '05' || #calMonth == '07' || #calMonth == '08' || #calMonth == '10' || #calMonth == '12' );
    #lastDate = Date(#calMonth+'/31/'+#calYear);
    #daysCount = 31;
else( #calMonth == '02' );
    if( #calYear%4 == 0 );
        #lastDate = Date(#calMonth+'/29/'+#calYear);
        #daysCount = 29;
    else;
        #lastDate = Date(#calMonth+'/28/'+#calYear);
        #daysCount = 28;
    /if;
else;
    #lastDate = Date(#calMonth+'/30/'+#calYear);
    #daysCount = 30;
/if;

/* Evaluate last date of the Previous Month */
if( #calMonth == '01' );
    #prevMonth = '12';
    #prevYear = Math_Sub(#calYear, 1);
else;
    #prevMonth = Math_Sub(#calMonth, 1);
    #prevYear = #calYear;
/if;
if( String(#prevMonth)->size == 1 );
    #prevMonth = '0'+#prevMonth;
/if;

if( #prevMonth == '01' || #prevMonth == '03' || #prevMonth == '05' || #prevMonth == '07' || #prevMonth == '08' || #prevMonth == '10' || #prevMonth == '12' );
    #prevLastDate = Date(#prevMonth+'/31/'+#prevYear);
    #prevDaysCount = 31;
else( #prevMonth == '02' );
    if( #prevYear%4 == 0 );
        #prevLastDate = Date(#prevMonth+'/29/'+#prevYear);
        #prevDaysCount = 29;
    else;
        #prevLastDate = Date(#prevMonth+'/28/'+#prevYear);
        #prevDaysCount = 28;
    /if;
else;
    #prevLastDate = Date(#prevMonth+'/30/'+#prevYear);
    #prevDaysCount = 30;
/if;

/* Evaluate last date of the Next Month */
if( #calMonth == '12' );
    #nextMonth = '01';
    #nextYear = Math_Add(#calYear, 1);
else;
    #nextMonth = Math_Add(#calMonth, 1);
    #nextYear = #calYear;
/if;
if( String(#nextMonth)->size == 1 );
    #nextMonth = '0'+#nextMonth;
/if;

if( #nextMonth == '01' || #nextMonth == '03' || #nextMonth == '05' || #nextMonth == '07' || #nextMonth == '08' || #nextMonth == '10' || #nextMonth == '12' );
    #nextLastDate = Date(#nextMonth+'/31/'+#nextYear);
    #nextDaysCount = 31;
else( #nextMonth == '02' );
    if( #nextYear%4 == 0 );
        #nextLastDate = Date(#nextMonth+'/29/'+#nextYear);
        #nextDaysCount = 29;
    else;
        #nextLastDate = Date(#nextMonth+'/28/'+#nextYear);
        #nextDaysCount = 28;
    /if;
else;
    #nextLastDate = Date(#nextMonth+'/30/'+#nextYear);
    #nextDaysCount = 30;
/if;

/* Calculate no. of weeks to be displayed in the grid */
if( #daysCount%7 == 0 );
    #weekRows = #daysCount/7;
else;
    #weekRows = (#daysCount/7) + 1;
/if;

if( Integer(#firstDay) == 1 );
    #dateCellBgClr = '';
/if;

Local: 'calDisplay' = #calDisplay + '<TABLE id="smallCalendarArea" BORDER="1" bgcolor="#ECE9D8" BORDERCOLOR="' + #weekDayHeader + '" HEIGHT="120" WIDTH="150" CELLSPACING="1" CELLPADDING="0" STYLE="border_collapse: collapse;">';

/********************************
*	MONTH & YEAR NAVIGATION LINKS *
********************************/
    Local: 'calDisplay' = #calDisplay + '<TR BGCOLOR="' + #weekDayHeader + '" HEIGHT="10" VALIGN="middle">';
        Local: 'calDisplay' = #calDisplay + '<TD ALIGN="center" colspan="7" id="navLinks" class="dayName">';
            Local: 'calDisplay' = #calDisplay + '<TABLE BORDER="0" BORDERCOLOR="' + #weekDayHeader + '" WIDTH="100%" CELLSPACING="0" CELLPADDING="0" STYLE="border_collapse: collapse;">';
                Local: 'calDisplay' = #calDisplay + '<TR VALIGN="middle">';
                    Local: 'calDisplay' = #calDisplay + '<TD ALIGN="left" WIDTH="30" class="monthName"><p> ';
                        Local: 'calDisplay' = #calDisplay + '<a href="' + (Response_FilePath)+'?smallCalendar=1&targetDateObjectId='(#targetDateObjectId)'&calMonth='(#calMonth)'&calYear='(#calYear-1) + '"><<</a> ';
                        if( #calMonth == 1 ); 
                            Local('calPreNavMonth') = 12;
                            Local('calPreNavYear') = #calYear-1; 
                        else; 
                            Local('calPreNavMonth') = #calMonth-1;
                            Local('calPreNavYear') = #calYear; 
                        /if;
                        Local: 'calDisplay' = #calDisplay + '<a href="' + (Response_FilePath)+'?smallCalendar=1&targetDateObjectId='(#targetDateObjectId)'&calMonth='(#calPreNavMonth)'&calYear='(#calPreNavYear) + '"><</a> </p></TD>';
                    Local: 'calDisplay' = #calDisplay + '<TD ALIGN="center" WIDTH="90" class="monthName"><p>'+ Date_Format( Date(#calMonth+'/01/'+#calYear), -Format='%B') + '-' + Date_Format( Date(#calMonth+'/01/'+#calYear), -Format='%y') +'</p></TD>';
                    Local: 'calDisplay' = #calDisplay + '<TD ALIGN="right" WIDTH="30" class="monthName"><p> ';
                        if( #calMonth == 12 ); 
                            Local('calNextNavMonth') = 01;
                            Local('calNextNavYear') = #calYear+1; 
                        else; 
                            Local('calNextNavMonth') = #calMonth+1;
                            Local('calNextNavYear') = #calYear; 
                        /if;
                        Local: 'calDisplay' = #calDisplay + '<a href="' + (Response_FilePath)+'?smallCalendar=1&targetDateObjectId='(#targetDateObjectId)'&calMonth='(#calNextNavMonth)'&calYear='(#calNextNavYear) + '">> ';
                        Local: 'calDisplay' = #calDisplay + '<a href="' + (Response_FilePath)+'?smallCalendar=1&targetDateObjectId='(#targetDateObjectId)'&calMonth='(#calMonth)'&calYear='(#calYear+1) + '">>></a> </p></TD>';
                Local: 'calDisplay' = #calDisplay + '</TR>';
            Local: 'calDisplay' = #calDisplay + '</TABLE>';
        Local: 'calDisplay' = #calDisplay + '</TD>';
    Local: 'calDisplay' = #calDisplay + '</TR>';
//-------------------------------------


    Local: 'calDisplay' = #calDisplay + '<TR BGCOLOR="' + #weekDayHeader + '" HEIGHT="10" VALIGN="middle" ID="dayName">';
        Local: 'calDisplay' = #calDisplay + '<TD ALIGN="center" WIDTH="' + (100.00/7) + '%" class="dayName"><p>S</p></TD>';
        Local: 'calDisplay' = #calDisplay + '<TD ALIGN="center" WIDTH="' + (100.00/7) + '%" class="dayName"><p>M</p></TD>';
        Local: 'calDisplay' = #calDisplay + '<TD ALIGN="center" WIDTH="' + (100.00/7) + '%" class="dayName"><p>T</p></TD>';
        Local: 'calDisplay' = #calDisplay + '<TD ALIGN="center" WIDTH="' + (100.00/7) + '%" class="dayName"><p>W</p></TD>';
        Local: 'calDisplay' = #calDisplay + '<TD ALIGN="center" WIDTH="' + (100.00/7) + '%" class="dayName"><p>T</p></TD>';
        Local: 'calDisplay' = #calDisplay + '<TD ALIGN="center" WIDTH="' + (100.00/7) + '%" class="dayName"><p>F</p></TD>';
        Local: 'calDisplay' = #calDisplay + '<TD ALIGN="center" WIDTH="' + (100.00/7) + '%" class="dayName"><p>S</p></TD>';
    Local: 'calDisplay' = #calDisplay + '</TR>';

Loop: #weekRows;
    #rowCounter = (loop_count);	
    if( #rowCounter == 1 );
        Loop( Integer(#firstDay)-1 );
            Local('cellBgColor1_'+(loop_count)) = #excludeCellBgClr;
            #prevDayIncr = #prevDaysCount - (Integer(#firstDay) - (loop_count));
        /Loop;
    /if;

    Local: 'calDisplay' = #calDisplay + '<TR>';

	Loop: 7;		
            if( #rowCounter > 1 );
                if( Integer(#daysCount) <= #rowCounter*(loop_count) );
                    Local('cellBgColor'+#rowCounter+'_'+(loop_count)) = #excludeCellBgClr;				
                /if;
            /if;
        Local: 'calDisplay' = #calDisplay + '<TD style="border: 1px outset;" ID="cell' + #rowCounter+'_'+(loop_count) + '" BGCOLOR="' + Local('cellBgColor'+#rowCounter+'_'+(loop_count)) + '">';
		
            // Get the day (dd) of the current date cell
            if( #rowCounter == 1 );
                if( Integer(#firstDay) <= (loop_count) );
                    #dateIncr += 1;
                    #tempDateIncr += 1;
                else;
                    #dateIncr = 0;
                    #tempDateIncr = 0;
                    #prevDayIncr = #prevDaysCount - (Integer(#firstDay) - (loop_count + 1));
                /if;
            else;
                #dateIncr += 1;
                #tempDateIncr += 1;
                if( Integer(#daysCount) < #tempDateIncr );
                    #dateIncr = 0;
                    #nextDayIncr += 1;
                /if;
            /if;
            if( #dateIncr > 0 );
                #cellDateDay = #dateIncr;
            else if( #nextDayIncr > 0 );
                #cellDateDay = #nextDayIncr;
            else;
                #cellDateDay = #prevDayIncr;
            /if;
            //--------------------------------------------------
		
            // Get the date in mm/dd/yyyy for the current cell
            if( #rowCounter == 1 );
                if( Integer(#cellDateDay) <= 7);
                    Local: 'cellDate' = #calMonth + '/' + #cellDateDay + '/' + #calYear;				
                    Local: 'dateDispStyle' = 'currMonDayCorner';
                else;
                    Local: 'cellDate' = #prevMonth + '/' + #cellDateDay + '/' + #prevYear;
                    Local: 'dateDispStyle' = 'otherdayCorner';
                /if;
            else( #rowCounter == #weekRows );
                if( Integer(#cellDateDay)-1 <= 6);
                    Local: 'cellDate' = #nextMonth + '/' + #cellDateDay + '/' + #nextYear;
                    Local: 'dateDispStyle' = 'otherdayCorner';
                else;
                    Local: 'cellDate' = #calMonth + '/' + #cellDateDay + '/' + #calYear;
                    Local: 'dateDispStyle' = 'currMonDayCorner';
                /if;
            else;
                Local: 'cellDate' = #calMonth + '/' + #cellDateDay + '/' + #calYear;
                Local: 'dateDispStyle' = 'currMonDayCorner';
            /if;
            //--------------------------------------------------
            
            If: (Date_Format: (Date), -Format='%D') == (Date_Format: Date(#cellDate), -Format='%D');
                Local: 'dateDispStyle' = 'todayCorner';
            /If;

/***************************************
*	DATE LINK		       *
****************************************/
	    Local: 'calDisplay' = #calDisplay +'<div id="dateCellBody" class="' + #dateDispStyle + '" onclick="
                                                                                                            if(\'' + #targetDateObjectId + '\' != \'\'){
                                                                                                                if(document.getElementById(\'' + #targetDateObjectId + '\') != null ){
                                                                                                                    document.getElementById(\'' + #targetDateObjectId + '\').value = \''+ String_Replace(#cellDate, -Find='\\', -Replace='_') +'\';
                                                                                                                    document.getElementById(\'' + #targetDateObjectId + '\').focus();
                                                                                                                }else if(window.parent.document.getElementById(\'' + #targetDateObjectId + '\') != null){
                                                                                                                    window.parent.document.getElementById(\'' + #targetDateObjectId + '\').value = \''+ String_Replace(#cellDate, -Find='\\', -Replace='_') +'\';
                                                                                                                    window.parent.document.getElementById(\'' + #targetDateObjectId + '\').focus();
                                                                                                                }
                                                                                                            }">' + #cellDateDay + '</div>';

//--------------------------------------
		
        Local: 'calDisplay' = #calDisplay + '</TD>';
	/Loop;

    Local: 'calDisplay' = #calDisplay + '</TR>';

/Loop;

Local: 'calDisplay' = #calDisplay + '</TABLE>';

Local: 'calDisplay' = #calDisplay + '</font>';
Local: 'calDisplay' = #calDisplay + '</div>';

Local: 'calDisplay' = #calDisplay + '<script language="javascript">
<!--
document.getElementById("smallCalendarArea").focus();
-->
</script>';

Return: (Local: 'calDisplay');

/Define_Tag;
/If;
]

 

Comments

none

Email:


Password:



Newest

Most Popular

Support tagSwap.net