示例#1
0
文件: helpers.php 项目: jaz303/zing
 public static function date_time_select($name, $value = null)
 {
     if ($value === null) {
         $value = new \Date_Time();
     }
     $iso = $value->iso_date_time();
     $name = self::prefix_field_name($name, '@');
     $html = "<span class='datetime-picker'>\n";
     $html .= "  <input type='text' value='' readonly='readonly' />\n";
     $html .= "  <input type='hidden' name='{$name}' value='{$iso}' />\n";
     $html .= "  <a href='#'>" . self::icon('calendar') . "</a>\n";
     $html .= "</span>\n";
     return $html;
 }
示例#2
0
文件: gdb.php 项目: jaz303/base-php
 public function quote_date_time($value)
 {
     if ($value === NULL) {
         return 'NULL';
     }
     if (!is_object($value)) {
         $value = new Date_Time($value);
     }
     return $this->quote_string($value->iso_date_time());
 }