From 91aa3355ca60b9c9c2c7c895dd616b09736ba95f Mon Sep 17 00:00:00 2001 From: ADmad Date: Mon, 7 Nov 2016 11:05:46 +0530 Subject: [PATCH] Allow specifying custom locale. --- src/View/Widget/DateTimeWidget.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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');