J
|
Jane 10/15/2008 |
Hi, $t=date("G",strtotime(now())); $m=date("i",strtotime(now())); global $conn; global $dal; $tperiod = 60; for ($i=1;$i<=60/$tperiod;$i++) { if ($m<=$tperiod$i) { $m=$tperiod$i; $i=100; } } if ($m>=60) { $t++; $m=0; } if ($t>23) $t=0; $tm = array(0,0,0,$t,$m,0); $t=format_time($tm); $str = ""; $str.= "<select name=\"value_TimeField\" onchange=\"if(document.editform.value_EndTime.value==''){t=document.editform.value_TimeField.selectedIndex+2;if(t>document.editform.value_TimeField.length-1)t-=2;document.editform.value_EndTime.options[t].selected=true;return false;}\">"; $str.= "<option value=\"\">Please select</option>"; for ($i=0; $i<24;$i++) { for ($j=1;$j<=60/$tperiod;$j++) { $s1=""; $p=($j-1)*$tperiod; $tm1 = array(0,0,0,$i,$p,0); if ($t==format_time($tm1)) $s1=" selected"; $time1 = sprintf("%02d:%02d:%02d",$i,$p,0); $str.= "<option value=\"".$time1."\"".$s1.">".format_time($tm1)."</option>"; } } $str.= "</select>"; echo $str; |
A
|
amuro author 10/16/2008 |
time dropdown in the Calendar is created using custom code on the Visual Editor tab.
|
J
|
Jane 10/20/2008 |
This code should be in the custom event (Insert PHP code snippet option on the Visual Editor tab). |
A
|
amuro author 11/26/2008 |
This code should be in the custom event (Insert PHP code snippet option on the Visual Editor tab).
|
J
|
Jane 11/26/2008 |
Hi, |
A
|
amuro author 11/27/2008 |
Hi, Jane |
J
|
Jane 11/27/2008 |
Hi,
|
A
|
amuro author 11/28/2008 |
Hi, Jane |
A
|
amuro author 12/9/2008 |
Hi, |
J
|
Jane 12/9/2008 |
Hi, ... for ($i=8; $i<18;$i++) { for ($j=1;$j<=60/$tperiod;$j++) { $s1=""; $p=($j-1)*$tperiod; $tm1 = array(0,0,0,$i,$p,0); if ($t==format_time($tm1)) $s1=" selected"; $time1 = sprintf("%02d:%02d:%02d",$i,$p,0); $str.= "<option value=\"".$time1."\"".$s1.">".format_time($tm1)."</option>"; } } ... |
A
|
amuro author 12/10/2008 |
Hi, Jane |
J
|
Jane 12/10/2008 |
Hi, |