]> git.joonet.de Git - adminer.git/commitdiff
PHP Warning hidden and better parsing times (at least for postgresql)
authorAdam Kusmierz <adam@kusmierz.be>
Tue, 20 Dec 2016 08:38:22 +0000 (09:38 +0100)
committerJakub Vrana <jakub@vrana.cz>
Sat, 18 Feb 2017 16:32:40 +0000 (17:32 +0100)
plugins/edit-calendar.php

index ea8dd11c9d32f07a03f23684eeeee45c9ae16b16..525ff6db4a7b482e2c34ccedf2cb95777e8835bf 100644 (file)
@@ -36,8 +36,8 @@ class AdminerEditCalendar {
        function editInput($table, $field, $attrs, $value) {
                if (preg_match("~date|time~", $field["type"])) {
                        $dateFormat = "changeYear: true, dateFormat: 'yy-mm-dd'"; //! yy-mm-dd regional
-                       $timeFormat = "showSecond: true, timeFormat: 'hh:mm:ss'";
-                       return "<input id='fields-" . h($field["field"]) . "' value='" . h($value) . "'" . (+$field["length"] ? " maxlength='" . (+$field["length"]) . "'" : "") . "$attrs><script type='text/javascript'>jQuery('#fields-" . js_escape($field["field"]) . "')."
+                       $timeFormat = "showSecond: true, timeFormat: 'HH:mm:ss.lcZ', timeInput: true";
+                       return "<input id='fields-" . h($field["field"]) . "' value='" . h($value) . "'" . (@+$field["length"] ? " maxlength='" . (+$field["length"]) . "'" : "") . "$attrs><script type='text/javascript'>jQuery('#fields-" . js_escape($field["field"]) . "')."
                                . ($field["type"] == "time" ? "timepicker({ $timeFormat })"
                                : (preg_match("~time~", $field["type"]) ? "datetimepicker({ $dateFormat, $timeFormat })"
                                : "datepicker({ $dateFormat })"