datePicker
[ class tree: datePicker ] [ index: datePicker ] [ all elements ]

example

  1. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
  2. <html>
  3.     <head>
  4.         <title>datepicker test</title>
  5.     </head>
  6. <body>
  7. <?php
  8.  
  9.     // include the class
  10.         require "../class.datepicker.php";
  11.  
  12.     // instantiate the object
  13.         $dp=new datepicker();
  14.     
  15.     $dp->enableTimePicker true;
  16.     
  17.     $dp->selectableTimesRange array(
  18.         array(1220206015)
  19.     );
  20.  
  21. ?>
  22.  
  23. <p>
  24.     An example about restricting selectable times...
  25. </p>
  26. <pre style="font-size:11px">
  27. &lt;?php
  28.  
  29. // include the class
  30. require "../class.datepicker.php";
  31.  
  32. // instantiate the object
  33. $dp=new datepicker();
  34.  
  35. // allow selection of time also
  36. $dp->enableTimePicker = true;
  37.  
  38. // restrict the selectable hours range to every second hour between 12 and 20
  39. // and minutes to every 15 minute
  40. $dp->selectableTimesRange = array(
  41.     array(12, 20, 2, 0, 60, 15)
  42. );
  43. ?&gt;
  44.  
  45. &lt;input type="text" id="date">
  46.  
  47. &lt;input type="button" value="..." onclick="&lt;?=$dp->show("date")?>">
  48. </pre>
  49.  
  50. <p>Click on the button to see it work</p>
  51.  
  52. <input type="text" id="date">
  53.  
  54. <input type="button" value="..." onclick="<?=$dp->show("date")?>">
  55.  
  56. </body>
  57. </html>

Documentation generated on Thu, 04 Sep 2008 10:13:49 +0300 by phpDocumentor 1.3.0RC6