Skip to content
This repository has been archived by the owner on Aug 12, 2019. It is now read-only.

Commit

Permalink
DateTimePicker regular expression fix
Browse files Browse the repository at this point in the history
  • Loading branch information
redwormik committed Nov 20, 2015
1 parent 950f7fc commit daaf742
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Controls/DateTimePicker.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ class DateTimePicker extends DateTimePickerPrototype
protected function getDefaultParser()
{
return function($value) {
if (!preg_match('#^(?P<dd>\d{1,2})[. -] *(?P<mm>\d{1,2})(?:[. -] *(?P<yyyy>\d{4})?)?(?: *[ -@] *(?P<hh>\d{1,2})[:.](?P<ii>\d{1,2})(?:[:.](?P<ss>\d{1,2}))?)?$#', $value, $matches)) {
if (!preg_match('#^(?P<dd>\d{1,2})[. -] *(?P<mm>\d{1,2})(?:[. -] *(?P<yyyy>\d{4})?)?(?: *[ @-] *(?P<hh>\d{1,2})[:.](?P<ii>\d{1,2})(?:[:.](?P<ss>\d{1,2}))?)?$#', $value, $matches)) {
return NULL;
}

Expand Down

0 comments on commit daaf742

Please sign in to comment.