diff --git a/src/jquery-ui-datepicker.js b/src/jquery-ui-datepicker.js index 711a6b5..b573c38 100644 --- a/src/jquery-ui-datepicker.js +++ b/src/jquery-ui-datepicker.js @@ -116,6 +116,10 @@ function init(Survey, $) { }; function setDateIntoQuestion() { var val = $el.datepicker('getDate'); + if (typeof val.setHours !== 'function') { + question.value = ''; + return; + } var d = new Date(); val.setHours(d.getHours()); val.setMinutes(d.getMinutes());