[Wolves] Php datepicker calendar - choosing dates
Wayne Morris
waynelists at machx.co.uk
Mon Mar 5 15:30:40 UTC 2012
I'm using some code from datepicker to use a calendar to allow people to
book in.
http://www.triconsole.com/php/calendar_datepicker.php
I can work out how to block say every sat,sun,mon etc using
disableddays, but want to allow occasional Sats (like one a month which
i don't mind editing code for as they arise)
So got:
<?php
$myCalendar = new tc_calendar("date2");
$myCalendar->setIcon("calendar/images/iconCalendar.gif");
$myCalendar->setDate(date('d'), date('m'),
date('Y'));
$myCalendar->setPath("calendar/");
$myCalendar->setYearInterval(2012, 2013);
$myCalendar->dateAllow('2012-03-3', '2012-08-05',
false);
$myCalendar->startMonday(true);
//$myCalendar->autoSubmit(true, "", "test.php");
//$myCalendar->autoSubmit(true, "form1");
$myCalendar->disabledDay("Sat");
$myCalendar->disabledDay("sun");
$myCalendar->disabledDay("mon");
$myCalendar->disabledDay("tue");
$myCalendar->disabledDay("thu");
$myCalendar->disabledDay("fri");
$myCalendar->dateAllow('2012-03-10');
$myCalendar->showWeeks(true);
$myCalendar->writeScript();
?>
Can I overide the disabledays with a 'except these' or do i have to do
it some other way?
Also, can I add a 'you haven't changed calendar, have another go' else
they might just choose default.
cheers
More information about the Wolves
mailing list