diff --git a/addons/web_editor/static/src/js/editor/snippets.options.js b/addons/web_editor/static/src/js/editor/snippets.options.js index 36ae9e04137..8469e2661ba 100644 --- a/addons/web_editor/static/src/js/editor/snippets.options.js +++ b/addons/web_editor/static/src/js/editor/snippets.options.js @@ -1049,8 +1049,18 @@ const DatetimePickerUserValueWidget = InputUserValueWidget.extend({ widgetParent: 'body', }; this.__libInput++; - $(this.inputEl).datetimepicker(datepickersOptions); + const $input = $(this.inputEl); + $input.datetimepicker(datepickersOptions); this.__libInput--; + + // Monkey-patch the library option to add custom classes on the pickers + const libObject = $input.data('datetimepicker'); + const oldFunc = libObject._getTemplate; + libObject._getTemplate = function () { + const $template = oldFunc.call(this, ...arguments); + $template.addClass('o_we_no_overlay o_we_datetimepicker'); + return $template; + }; }, //--------------------------------------------------------------------------