calendarxp Site Admin
Joined: 30 Jan 2005 Posts: 409
|
Posted: Tue Feb 15, 2005 6:40 pm Post subject: I would like to use images instead of the text numbers for the date numbers. Would this be easy to do? |
|
|
Yes, easy. There is an option in the theme-name.js file called gsDays which will be evaluated upon each calendar cell. Simply name your image files as day1.gif, day2.gif, ... and create a function, named fGetDateCell(), in the plugins.js as following:
Code: | function fGetDateCell(dateStr) {
var d=dateStr.split(",")[2];
return "<IMG src='/images/day"+d+".gif' height=... width=... >";
} |
and set the gsDays in theme to:
Code: | var gsDays="fGetDateCell(sCellDate);"; |
Note the sCellDate above is an internal contextual variable that stores the current cell date in format "y,m,d".
_________________ Copyright 2003-2011 Idemfactor Solutions, Inc. All rights reserved. |
|