From daaf742fb8010e760a3862c38fe6299ba0798ad4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20=C4=8Cervenka?= Date: Fri, 20 Nov 2015 09:41:04 +0100 Subject: [PATCH] DateTimePicker regular expression fix --- src/Controls/DateTimePicker.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Controls/DateTimePicker.php b/src/Controls/DateTimePicker.php index 6af6014..d3a43eb 100644 --- a/src/Controls/DateTimePicker.php +++ b/src/Controls/DateTimePicker.php @@ -31,7 +31,7 @@ class DateTimePicker extends DateTimePickerPrototype protected function getDefaultParser() { return function($value) { - if (!preg_match('#^(?P
\d{1,2})[. -] *(?P\d{1,2})(?:[. -] *(?P\d{4})?)?(?: *[ -@] *(?P\d{1,2})[:.](?P\d{1,2})(?:[:.](?P\d{1,2}))?)?$#', $value, $matches)) { + if (!preg_match('#^(?P
\d{1,2})[. -] *(?P\d{1,2})(?:[. -] *(?P\d{4})?)?(?: *[ @-] *(?P\d{1,2})[:.](?P\d{1,2})(?:[:.](?P\d{1,2}))?)?$#', $value, $matches)) { return NULL; }