Skip to content

Commit a110615

Browse files
committed
Add locale time to jQuery datepicker value fixed #313
1 parent 3f39397 commit a110615

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/jquery-ui-datepicker.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,12 @@ function init(Survey, $) {
112112
return result;
113113
};
114114
function setDateIntoQuestion() {
115-
question.value = $el.datepicker('getDate');
115+
var val = $el.datepicker('getDate');
116+
var d = new Date();
117+
val.setHours(d.getHours());
118+
val.setMinutes(d.getMinutes());
119+
val.setSeconds(d.getSeconds());
120+
question.value = val;
116121
}
117122
var pickerWidget = $el.datepicker(config).on("change", function (e) {
118123
setDateIntoQuestion();

0 commit comments

Comments
 (0)