From 5a20d0a9f2c7634807721a55187b349b8193bee9 Mon Sep 17 00:00:00 2001 From: fredtempez Date: Wed, 28 Nov 2018 15:31:47 +0100 Subject: [PATCH] v8.4.9 : forma date output plain text --- module/form/form.php | 2 +- module/form/view/index/index.js.php | 24 ++++++++++++++++++++++++ module/form/view/index/index.php | 1 - 3 files changed, 25 insertions(+), 2 deletions(-) create mode 100644 module/form/view/index/index.js.php diff --git a/module/form/form.php b/module/form/form.php index 865d656a..0b8d25c3 100755 --- a/module/form/form.php +++ b/module/form/form.php @@ -182,7 +182,7 @@ class form extends common { $filter = helper::FILTER_STRING_LONG; break; case self::TYPE_DATETIME: - $filter = helper::FILTER_DATETIME; + $filter = helper::FILTER_STRING_SHORT; break; default: $filter = helper::FILTER_STRING_SHORT; diff --git a/module/form/view/index/index.js.php b/module/form/view/index/index.js.php new file mode 100644 index 00000000..699b1831 --- /dev/null +++ b/module/form/view/index/index.js.php @@ -0,0 +1,24 @@ +/** + * This file is part of Zwii. + * + * For full copyright and license information, please see the LICENSE + * file that was distributed with this source code. + * + * @author Frédéric Tempez + * @copyright Copyright (C) 2008-2018, Frédéric Tempez + * @license GNU General Public License, version 3 + * @link http://zwiicms.com/ + */ + +/** + * Paramétrage du format de date + */ +$(function() { + $(".datepicker").flatpickr({ + altInput: true, + altFormat: "d/m/Y", + enableTime: false, + locale: "fr", + dateFormat: "d/m/Y" + }); +}); diff --git a/module/form/view/index/index.php b/module/form/view/index/index.php index 0724ef9c..79e92f34 100755 --- a/module/form/view/index/index.php +++ b/module/form/view/index/index.php @@ -31,7 +31,6 @@ 'formInput_' . $index, 'label' => $input['name'], - 'value' => time(), 'vendor' => 'flatpickr' ]); ?>