Board Logo

Input Field Color [SOLVED]
ScotDiddle - 3/27/2008 at 12:41 PM

Good Morning, All,

Suppose I have several calendars displayed for my user... They select their dates, then submit the form...

Of calendars A, B, C, D, and E, all have valid dates ( from my applications perspective ), except D, which has an invalid date.

Upon re-presenting the page to my user, how do I highlight the input date field for Calendar D to appear in RED, to make it easier for my user to find which calendar date needs correcting.


Scot L. Diddle, Richmond VA

tigra - 3/27/2008 at 03:07 PM

With the PRO version of the script you can attach the calendar to the existing static HTML input box.
You can then generate the style attributes with the server side script.

ScotDiddle - 3/27/2008 at 07:00 PM


I read in your doc that I could contol color, but how do I id the name of the input box... When I "view source " of my HTML, all's I see is "new calendar(cal_name, Tpl_name)"

Any Suggestions ?

Thanks, Scot

ScotDiddle - 6/18/2008 at 06:50 PM

Hello All You Tigra Calendar Enthusiasts !

Well... Had to answer my own question...

It turns out that the HTML 'id=' of the input fields are generated via the javascript var: 'this.TC07' in the calendar.js file function: 'function calendar(TCL,TCK) { ' (in the " document.write('<input type="Text" ...') " statement... ). 'this.TC07' is the vlaue of the 'controlname': parm you specify when defining your calendar... Vis.:


var CAL_INIT1 = {
'controlname': 'MY_CALENDAR_NAME',
'formname': 'test_form',
'dataformat': 'd.m.Y H:i',
'replace': true

Here, the HTML name 'id=' name of the calendar's input box is : 'MY_CALENDAR_NAME'.

I am not sure about the other modes of calendar generation, ( like pop-up, et-all), since I use modal_mode exclusively, but if you fail, or choose not to, include a 'controlname' parm, you get: id='datetime_0', id='datetime_1' (etc.) ... , one for each calendar defined on your page via:


for (var n = 0; n < A_CALENDARS.length; n++) {

Now that that is clear (as mud) you just have to have a CSS Style sheet with entries like;


color: #205E75;
font-family: Verdana, Tahoma;
font-size: 11px;
padding-left: 5px;
padding-right: 5px;

... ( one for each name calendar)

/* or */

#datetime_0 { /* _0, _1, _2, ...etc : one for each calendar */
color: #205E75;
font-family: Verdana, Tahoma;
font-size: 11px;
padding-left: 5px;
padding-right: 5px;

Now, if I could just figure out how to close a calendar programmatically, I would be a happy camper.

Scot L. Diddle, Richmond VA

tigra - 6/19/2008 at 06:30 AM

you can use .showcal() method for that.



ScotDiddle - 6/19/2008 at 11:01 AM

Tigra Admin...

Thanks. That almost works... What I need to accomplish is that when a user opens a calendar, then decides to select a hidden div to display some date-range calendars, and they fail to close the single date calendar, I need to close if for them.

Adding your code in a function called via "onChange=" parm in my "switch div" select, if the cal is open, it closes it, but if it is closed, it opens it...

Is there some way to determine the name of the calendar(s) which is/are currently open, so I can do:


if system finds that the punkin' user left cal[n] open while onChange is happening {

Do the "close option" of A_CALENDARS[n].showcal();




Scot L. Diddle, Richmond VA

tigra - 6/19/2008 at 01:07 PM

property TC3b is the state indicator i.e.

if (A_CALENDARS[n].TC3b)

ScotDiddle - 6/19/2008 at 05:52 PM

Tigra Admin,

Thanks for the input... I posted my solution here:

Any idea how to revert the 'click me to close' icon without having to call .showcal() twice ?

If you have any ideas, please post under the new thread.


Scot L. Diddle, Happy Camper.

tigra - 6/20/2008 at 05:50 AM

the calendar swaps the icon like this:


when done from outside of the calendar replace 'this' with 'A_CALENDARS[n]'

Back to forum: