Skip to content

Commit 6908216

Browse files
committed
fix(jquery-datepicker): clear value when datepicker is cleared
1 parent 6e2008a commit 6908216

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/jquery-ui-datepicker.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,10 @@ function init(Survey, $) {
116116
};
117117
function setDateIntoQuestion() {
118118
var val = $el.datepicker('getDate');
119+
if (!val || typeof val.setHours !== 'function') {
120+
question.value = '';
121+
return;
122+
}
119123
var d = new Date();
120124
val.setHours(d.getHours());
121125
val.setMinutes(d.getMinutes());

0 commit comments

Comments
 (0)