summaryrefslogtreecommitdiff
path: root/app/Core
diff options
context:
space:
mode:
authorFrederic Guillot <fred@kanboard.net>2017-01-24 20:04:58 -0500
committerFrederic Guillot <fred@kanboard.net>2017-01-24 20:04:58 -0500
commitd81fb20df66fd77e41f0f7d573e60b856b1e9f8a (patch)
treeea65bb3339714e5cfac6e5d781901375d1c1851a /app/Core
parentb23613bbe369011256de8a558707ab9096074e9e (diff)
Fix wrong datetime formatting when task form shows validation errors
Diffstat (limited to 'app/Core')
-rw-r--r--app/Core/DateParser.php6
1 files changed, 2 insertions, 4 deletions
diff --git a/app/Core/DateParser.php b/app/Core/DateParser.php
index b9aa9230..5d3be644 100644
--- a/app/Core/DateParser.php
+++ b/app/Core/DateParser.php
@@ -292,11 +292,9 @@ class DateParser extends Base
{
foreach ($fields as $field) {
if (! empty($values[$field])) {
- if (! ctype_digit($values[$field])) {
- $values[$field] = strtotime($values[$field]);
+ if (ctype_digit($values[$field])) {
+ $values[$field] = date($format, $values[$field]);
}
-
- $values[$field] = date($format, $values[$field]);
} else {
$values[$field] = '';
}