* All apps: Fix not able to set date for empty date fields in mobile template

This commit is contained in:
Hadi Nategh 2016-07-25 10:44:44 +02:00
parent 51e41012e3
commit 5459267be2

View File

@ -467,7 +467,7 @@ String: A string in the user\'s date format, or a relative date. Relative dates
_value = date('Y-m-d\\TH:i:s\\Z', _value);
}
// Check for full timestamp
if(typeof _value == 'string' && _value.match(/(\d{4})-(\d{2})-(\d{2})T(\d{2})\:(\d{2})\:(\d{2})(?:\.\d{3})?(?:Z|[+-](\d{2})\:(\d{2}))/))
if(typeof _value == 'string' && _value.match(/^(\d{4})-(\d{2})-(\d{2})T(\d{2})\:(\d{2})\:(\d{2})(?:\.\d{3})?(?:Z|[+-](\d{2})\:(\d{2})|)$/))
{
_value = new Date(_value);
}