public function date($name, $value = null, $options = []) { if ($value instanceof DateTime) { $value = $value->format('Y-m-d'); } return $this->input('date', $name, $value, $options); }
/** * Create a date input field. * * @param string $name * @param string $value * @param array $options * @return string * @static */ public static function date($name, $value = null, $options = array()) { return \Collective\Html\FormBuilder::date($name, $value, $options); }