From 16efdd1b5f7121e490c6bb13f84c3d374a17fb16 Mon Sep 17 00:00:00 2001 From: Hugues Peccatte Date: Sat, 7 Dec 2019 23:04:40 +0100 Subject: [PATCH] Display date/time picker only for date/time fields Signed-off-by: Hugues Peccatte --- js/functions.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/js/functions.js b/js/functions.js index a94c3b9450..14c8fcfd3c 100644 --- a/js/functions.js +++ b/js/functions.js @@ -112,6 +112,10 @@ $.ajaxPrefilter(function (options, originalOptions) { * @param {object} $thisElement a jQuery object pointing to the element */ Functions.addDatepicker = function ($thisElement, type, options) { + if (type !== 'date' && type !== 'time' && type !== 'datetime' && type !== 'timestamp') { + return; + } + var showTimepicker = true; if (type === 'date') { showTimepicker = false;