diff --git a/packages/enketo-core/src/widget/date/datepicker-extended.js b/packages/enketo-core/src/widget/date/datepicker-extended.js index 6febee31..7e7e9a30 100644 --- a/packages/enketo-core/src/widget/date/datepicker-extended.js +++ b/packages/enketo-core/src/widget/date/datepicker-extended.js @@ -87,7 +87,12 @@ class DatepickerExtended extends Widget { _setChangeHandler($fakeDateI) { const { settings } = this; - $fakeDateI.on('change paste', (e) => { + let changeEvent = 'change'; + if (!$fakeDateI.closest('label').hasClass('readonly')) { + changeEvent += ' paste'; + } + + $fakeDateI.on(changeEvent, (e) => { let convertedValue = ''; let value = e.type === 'paste'