Best Free Javascript/DHTML Calendar I’ve Seen

Check out the Swazz Calendar. Small file size, easy to integrate and actually works.

One caveat: by default, it sets the date the European way (dd/mm/yyyy). To change to the American format, find the following line in the prepcalendar function:

calvalarr[d]=”+(d-cd)+’/'+(cm-(-1))+’/'+cy;

and change it to:

calvalarr[d]=”+(cm-(-1))+’/'+(d-cd)+’/'+cy;

Then find these lines in function lcs:

ccm=curdtarr[1]-1;
ccy=curdtarr[2];
prepcalendar(curdtarr[0],curdtarr[1]-1,curdtarr[2]);

Change them to:

ccm=curdtarr[0]-1;
ccy=curdtarr[2];
prepcalendar(curdtarr[1],curdtarr[0]-1,curdtarr[2]);

VoilĂ . (That means “There you go” in English. ;) )

This entry was posted in Technology. Bookmark the permalink. Post a comment or leave a trackback: Trackback URL.

Post a Comment

Your email is never published nor shared. Required fields are marked *

*
*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>