File tree Expand file tree Collapse file tree 1 file changed +3
-8
lines changed Expand file tree Collapse file tree 1 file changed +3
-8
lines changed Original file line number Diff line number Diff line change @@ -102,21 +102,16 @@ function init(Survey, $) {
102102 daysOfWeekHighlighted : question . daysOfWeekHighlighted ,
103103 disableTouchKeyboard : question . disableTouchKeyboard ,
104104 } )
105- // .on("changeDate", function (e) {
106- // question.value = moment(e.date).format("DD/MM/YYYY");
107- // // `e` here contains the extra attributes
108- // })
109105 . on ( "change" , function ( e ) {
110- var newValue = pickerWidget . val ( ) ;
106+ var newDate = pickerWidget . bootstrapDP ( "getUTCDate" ) ;
107+ var newValue = newDate && newDate . toUTCString ( ) ;
111108 if ( question . value != newValue ) {
112109 question . value = newValue ;
113110 }
114111 } ) ;
115112
116113 question . valueChangedCallback = function ( ) {
117- // pickerWidget.val(question.value);
118- // $el.bootstrapDP('update', moment(question.value, "DD/MM/YYYY").toDate());
119- pickerWidget . bootstrapDP ( "update" , ! ! question . value ? new Date ( question . value ) : "" ) ;
114+ pickerWidget . bootstrapDP ( "setUTCDate" , ! ! question . value ? new Date ( question . value ) : "" ) ;
120115 } ;
121116 question . valueChangedCallback ( ) ;
122117 question . readOnlyChangedCallback = function ( ) {
You can’t perform that action at this time.
0 commit comments