Welcome, Guest. Please login or register.
Did you miss your activation email?


Login with username, password and session length

Search

 
Advanced search

8043 Posts in 1856 Topics- by 2099 Members - Latest Member: roi
Pages: [1]   Go Down
Print
Author Topic: Color on cells with no date  (Read 258 times)
0 Members and 1 Guest are viewing this topic.
Bryan73
New Member
*

Karma: 0
Offline Offline

Posts: 0


WWW
« on: February 24, 2003, 12:39:00 AM »

Hi there,

I'm trying to set up the calendar cells to have color A if it has a date and color B if it doesn't. I.e. for the month of February, the 1st starts on a Saturday....so, the days from Sunday to Friday before that are just empty cells. I'd like those particular cells to have a seperate color from the other dates. Is that possible ?

Thanks

Logged
DanO
Moderator
Full Member
*****

Karma: 13
Offline Offline

Posts: 230

Please don't PM me. Post in the open forum.


WWW
« Reply #1 on: February 24, 2003, 01:09:00 PM »

Look in the default.html template file (assuming you're using the default templates) for the lines of code following:

<!-- MONTHLY OR WEEKLY VIEW -->

then following:

<%FOREACH GRID COLUMN%>

The following line defines the colouring of the grid cell:

code:
<TD CLASS="thinborder" VALIGN=TOP WIDTH=14% <%=$rowheight%> BGCOLOR="<%IF SELECTED%><%=$_GRID_CELL_SELECTED_BGCOLOR%><%ELSE%><%=$_GRID_CELL_BGCOLOR%><%/IF%>">

You can try the following in place of it which should colour cells without a number in them the same as the page background colour.

code:
<% if ($DAY->{'dd'}) { %>
<TD CLASS="thinborder" VALIGN=TOP WIDTH=14% <%=$rowheight%> BGCOLOR="<%IF SELECTED%><%=$_GRID_CELL_SELECTED_BGCOLOR%><%ELSE%><%=$_GRID_CELL_BGCOLOR%><%/IF%>">
<% } else { %>
<TD CLASS="thinborder" VALIGN=TOP WIDTH=14% <%=$rowheight%> BGCOLOR="<%=$_BGCOLOR%>">
<% } %>

The <%=$_BGCOLOR%> being the code where the colour is specified.

Dan O.

BTW. That will only work on the monthly grid display as on any of the others, all the calendar cells have a number in them.

[This message has been edited by DanO (edited February 24, 2003).]

Logged
Bryan73
New Member
*

Karma: 0
Offline Offline

Posts: 0


WWW
« Reply #2 on: February 24, 2003, 02:47:00 PM »

DanO,

Thanks ! With your help, I got it working perfectly. Not that it's a major issue, but, for other new users like myself - may I add  :

You stated to look for :
<!-- MONTHLY OR WEEKLY VIEW -->
When doing a search from within the default.html, the correct search criteria would be :
<%-- MONTHLY OR WEEKLY VIEW --%>

Also, just below that area, you're supposed to look for :
<%FOREACH GRID COLUMN%>
There are TWO titles of that name in that area, look for the second one and modify the code just below that (I scanned too quickly and started to modify the wrong code just below the first heading).

Besides that, works great - thanks again.


------------------

Logged
Pages: [1]   Go Up
Print
Jump to: