diff --git a/src/View/Widget/DateTimeWidget.php b/src/View/Widget/DateTimeWidget.php index 312441bd..97f80853 100644 --- a/src/View/Widget/DateTimeWidget.php +++ b/src/View/Widget/DateTimeWidget.php @@ -28,7 +28,7 @@ public function render(array $data, ContextInterface $context) $disabled = isset($data['disabled']) && $data['disabled'] ? 'disabled' : ''; $role = isset($data['role']) ? $data['role'] : 'datetime-picker'; $format = null; - $locale = I18n::locale(); + $locale = isset($data['locale']) ? $data['locale'] : I18n::locale(); $timezoneAware = Configure::read('CrudView.timezoneAwareDateTimeWidget');