@@ 369-376 (lines=8) @@ | ||
366 | * |
|
367 | * @return \Illuminate\Support\HtmlString |
|
368 | */ |
|
369 | public function date($name, $value = null, $options = []) |
|
370 | { |
|
371 | if ($value instanceof DateTime) { |
|
372 | $value = $value->format('Y-m-d'); |
|
373 | } |
|
374 | ||
375 | return $this->input('date', $name, $value, $options); |
|
376 | } |
|
377 | ||
378 | /** |
|
379 | * Create a datetime input field. |
|
@@ 387-394 (lines=8) @@ | ||
384 | * |
|
385 | * @return \Illuminate\Support\HtmlString |
|
386 | */ |
|
387 | public function datetime($name, $value = null, $options = []) |
|
388 | { |
|
389 | if ($value instanceof DateTime) { |
|
390 | $value = $value->format(DateTime::RFC3339); |
|
391 | } |
|
392 | ||
393 | return $this->input('datetime', $name, $value, $options); |
|
394 | } |
|
395 | ||
396 | /** |
|
397 | * Create a datetime-local input field. |
|
@@ 405-412 (lines=8) @@ | ||
402 | * |
|
403 | * @return \Illuminate\Support\HtmlString |
|
404 | */ |
|
405 | public function datetimeLocal($name, $value = null, $options = []) |
|
406 | { |
|
407 | if ($value instanceof DateTime) { |
|
408 | $value = $value->format('Y-m-d\TH:i'); |
|
409 | } |
|
410 | ||
411 | return $this->input('datetime-local', $name, $value, $options); |
|
412 | } |
|
413 | ||
414 | /** |
|
415 | * Create a time input field. |