Skip to content

Commit

Permalink
fix(jquery-datepicker): clear value when datepicker is cleared
Browse files Browse the repository at this point in the history
  • Loading branch information
alebiavati authored Apr 8, 2024
1 parent 6e2008a commit 6e3c91c
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/jquery-ui-datepicker.js
Original file line number Diff line number Diff line change
Expand Up @@ -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());
Expand Down

0 comments on commit 6e3c91c

Please sign in to comment.