diff options
author | Igor Scheller <igor.scheller@igorshp.de> | 2018-09-25 17:33:31 +0200 |
---|---|---|
committer | msquare <msquare@notrademark.de> | 2018-10-30 21:13:56 +0100 |
commit | 7f61dc95be4ac543986c7df2459532fd8f81368d (patch) | |
tree | 930497c659bbaa3e073313a261f3458348fd423d /includes/sys_form.php | |
parent | 63d1292bf80d88be40eec7695c1a59f29e6609c5 (diff) |
EventConfig: Merge event configuration from database to global config
Diffstat (limited to 'includes/sys_form.php')
-rw-r--r-- | includes/sys_form.php | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/includes/sys_form.php b/includes/sys_form.php index edf9542a..a1b78b70 100644 --- a/includes/sys_form.php +++ b/includes/sys_form.php @@ -1,5 +1,6 @@ <?php // Methods to build a html form. +use Carbon\Carbon; /** * Renders a hidden input @@ -63,6 +64,7 @@ function form_spinner($name, $label, $value) function form_date($name, $label, $value, $start_date = '', $end_date = '') { $dom_id = $name . '-date'; + $value = ($value instanceof Carbon) ? $value->getTimestamp() : $value; $value = is_numeric($value) ? date('Y-m-d', $value) : ''; $start_date = is_numeric($start_date) ? date('Y-m-d', $start_date) : ''; $end_date = is_numeric($end_date) ? date('Y-m-d', $end_date) : ''; |