File tree Expand file tree Collapse file tree 1 file changed +13
-7
lines changed Expand file tree Collapse file tree 1 file changed +13
-7
lines changed Original file line number Diff line number Diff line change @@ -83,15 +83,21 @@ function init(Survey, $) {
8383 question . readOnlyChangedCallback = function ( ) {
8484 $el . datepicker ( "option" , "disabled" , question . isReadOnly ) ;
8585 } ;
86- question . readOnlyChangedCallback ( ) ;
87-
86+ function updateDate ( ) {
87+ if ( question . value ) {
88+ pickerWidget . datepicker ( "setDate" , question . value ) ;
89+ } else {
90+ pickerWidget . datepicker ( "setDate" , null ) ;
91+ }
92+ }
93+ question . registerFunctionOnPropertyValueChanged ( "dateFormat" , function ( ) {
94+ question . dateFormat && pickerWidget . datepicker ( "option" , "dateFormat" , question . dateFormat ) ;
95+ updateDate ( ) ;
96+ }
97+ ) ;
8898 question . valueChangedCallback = function ( ) {
8999 if ( ! isSelecting ) {
90- if ( question . value ) {
91- pickerWidget . datepicker ( "setDate" , question . value ) ;
92- } else {
93- pickerWidget . datepicker ( "setDate" , null ) ;
94- }
100+ updateDate ( ) ;
95101 $el . blur ( ) ;
96102 }
97103 } ;
You can’t perform that action at this time.
0 commit comments