Posted by Jay on Thursday, October 15th, 2009 at 9:40 am
Just a quick post for any of our ThemeForest customers who’ve purchased our PHP Event Calendar Script and would like to change the first day of the week to Sunday.
If you want Sunday to be the first day enter this code
1 2 3 4 5 6 | $firstday = date("w",mktime(0, 0, 0, $month, 1, $year)); if ($firstday != 0){ for($y=$firstday; $y> 0; $y--) { echo "<div class='cal_day' style='background:none;'></div>"; } } |
before this line
1 | for($i=1; $i<= $day_count; $i++) { // Start of for $i |
in the function list_events in the functions.php file.
Thanks to swamp_under on ThemeForest for posting this fix!
© 2010 Jigowatt Creative Media. All rights reserved. Registered in England and Wales Company No 6447684. VAT No 941781508
I purchased this script from Code Canyon and I think it is a great script, but I would like to have the calendar start on a Sunday. I looked for the code “for($i=1; $i<= $day_count; $i++) { // Start of for $i" in functions.php, but to no avail.
Am I missing something?
Also…how might I go about assigning an alternate BG color to the days with events?