|
@@ 146-155 (lines=10) @@
|
| 143 |
|
* |
| 144 |
|
* @return \Spatie\Html\Elements\Input |
| 145 |
|
*/ |
| 146 |
|
public function date($name = '', $value = null, $format = true) |
| 147 |
|
{ |
| 148 |
|
$element = $this->input('date', $name, $value); |
| 149 |
|
|
| 150 |
|
if (! $format || empty($element->getAttribute('value'))) { |
| 151 |
|
return $element; |
| 152 |
|
} |
| 153 |
|
|
| 154 |
|
return $element->value($this->formatDateTime($element->getAttribute('value'), self::HTML_DATE_FORMAT)); |
| 155 |
|
} |
| 156 |
|
|
| 157 |
|
/** |
| 158 |
|
* @param string|null $name |
|
@@ 164-173 (lines=10) @@
|
| 161 |
|
* |
| 162 |
|
* @return \Spatie\Html\Elements\Input |
| 163 |
|
*/ |
| 164 |
|
public function time($name = '', $value = null, $format = true) |
| 165 |
|
{ |
| 166 |
|
$element = $this->input('time', $name, $value); |
| 167 |
|
|
| 168 |
|
if (! $format || empty($element->getAttribute('value'))) { |
| 169 |
|
return $element; |
| 170 |
|
} |
| 171 |
|
|
| 172 |
|
return $element->value($this->formatDateTime($element->getAttribute('value'), self::HTML_TIME_FORMAT)); |
| 173 |
|
} |
| 174 |
|
|
| 175 |
|
/** |
| 176 |
|
* @param string $tag |