Show popup calendar when editing entries Default: We are using a shareware popup calendar by Liming Weng called PopCalendarXP. Please only enable this for evaluation purposes, or if you have purchased this software from Robin.
See http://www.hotscripts.com/Detailed/10619.html
If you prefer your own calendar, we provide the ability to define the javascript function to call when the calendar icon is clicked. Instead of setting $lens->showCal = true or false, set $lens->showCal to the name of the javascript function. See below for an example. This is since 2.2.6.Syntax
$lens->showCal = true;
# Alternatively define your own js calendar function
# the example below is not a full calendar and is
# to help you understand the API.
$lens->showCal = 'MyCalendar';
<script>
// zdoc is the document object
// ctrlname is the name of the control, starting with zdoc
// range normally range is set to null
// is an array in this format
// [RangeBeginDate, RangeEndDate {,disabledDate}]
function MyCalendar(zdoc,ctrlname,range)
{
var od,om,oy,d
od = eval(ctrlname+'_d');
om = eval(ctrlname+'_m');
oy = eval(ctrlname+'_y');
alert(od.value + '/'+om.value+'/'+oy.value);
// now we have 3 text objects which hold y/m/d
//now call your calendar and set the values...
/*
// call calendar function and return date!
d = ShowCalendar();
od.value = d.getDate();
om.value = d.getMonth()+1;
oy.value = d.getFullYear();
*/
}
</script> Basic:Yes Advanced/Enterprise:Yes DynamicEdit:Yes [Version 1.2]
|