diff --git a/src/Menu/MenuDropdown.php b/src/Menu/MenuDropdown.php
index 144405d9..ccfcb227 100644
--- a/src/Menu/MenuDropdown.php
+++ b/src/Menu/MenuDropdown.php
@@ -10,7 +10,6 @@ class MenuDropdown
**/
protected $title;
-
/**
* Array of MenuDivider|MenuItem entries
*
diff --git a/src/View/Widget/DateTimeWidget.php b/src/View/Widget/DateTimeWidget.php
index 1ff8cb9a..f737a0ec 100644
--- a/src/View/Widget/DateTimeWidget.php
+++ b/src/View/Widget/DateTimeWidget.php
@@ -41,7 +41,13 @@ public function render(array $data, ContextInterface $context)
}
if (!($val instanceof DateTimeInterface) && !empty($val)) {
- $val = $type === 'date' ? Time::parseDate($val) : Time::parseDateTime($val);
+ if ($type === 'date') {
+ $val = Time::parseDate($val);
+ } elseif ($type === 'time') {
+ $val = Time::parseTime($val);
+ } else {
+ $val = Time::parseDateTime($val);
+ }
}
if ($val) {
@@ -54,9 +60,19 @@ public function render(array $data, ContextInterface $context)
}
if (!$format) {
- $format = $type === 'date' ? 'L' : 'L LT';
+ if ($type === 'date') {
+ $format = 'L';
+ } elseif ($type === 'time') {
+ $format = 'LT';
+ } else {
+ $format = 'L LT';
+ }
}
+ $icon = $type === 'time'
+ ? 'time'
+ : 'calendar';
+
$widget = <<
html;