Click to See Complete Forum and Search --> : Calendar Displaying+holidays should be in disable mode(holidays stored in the oracle


suresh_pendyala
10-12-2003, 11:28 PM
HI Friends,


I'm working Leave Module....I got one problem.....I'm using JSP,Javascript...

I'm storing all public holidays list in oracle database....while displaying calendar(using javascript) the holidays which are in database should appear in invisilble(gray colour)mode...


send me the code(in any platform)

lillu
10-13-2003, 08:54 AM
Put public holidays in an array in the same format they look in Oracle. Check if there's a match.

arrPublic = new Array("2003/01/01","2003/12/26");

Here's a simple check for weekdays:


var today = new Date;
var dayOfWeek = today.getDay();

if (dayOfWeek==6||dayOfWeek==0) // Saturday or Sunday

In case of a match set the attribute of the date fields accordingly.
Disabled can mean a lot of things:
- uneditable
- cannot be clicked on?
- just a different color
- or your script will suppress them when calculating the duration of someone's leave?