Display date/time picker only for date/time fields

Signed-off-by: Hugues Peccatte <hugues.peccatte@gmail.com>
This commit is contained in:
Hugues Peccatte 2019-12-07 23:04:40 +01:00 committed by William Desportes
parent bee397e680
commit 16efdd1b5f
No known key found for this signature in database
GPG Key ID: 90A0EF1B8251A889

View File

@ -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;