diff --git a/packages/enketo-core/src/widget/text-print/text-print.js b/packages/enketo-core/src/widget/text-print/text-print.js index d379e0a90..7cd1d34ec 100644 --- a/packages/enketo-core/src/widget/text-print/text-print.js +++ b/packages/enketo-core/src/widget/text-print/text-print.js @@ -36,6 +36,15 @@ class TextPrintWidget extends Widget { this.element.after(printElement); this.element.classList.add('print-hide'); + // If previous element is a fake input in date widget, hide it as well + const previousElement = this.element.previousElementSibling; + if ( + previousElement !== null && + previousElement.classList.contains('date') + ) { + previousElement.classList.add('print-hide'); + } + this.widget = this.element.parentElement.querySelector( `.${className}` );