diff --git a/jquery.mobile.datepicker.js b/jquery.mobile.datepicker.js index f1feb03..9851aac 100644 --- a/jquery.mobile.datepicker.js +++ b/jquery.mobile.datepicker.js @@ -39,6 +39,7 @@ $(object.settings.altField) .date( "addMobileStyle" ); } + object.input.trigger("change"); },0); }, // Define a callback function when a date is selected onChangeMonthYear: function(month,year,object){ @@ -57,7 +58,7 @@ var self = this; setTimeout( function(){ $(element) - .data("mobileDate").addMobileStyle(); + .date( "addMobileStyle" ); },0); },// Define a callback function when the month or year is changed numberOfMonths: 1, // Number of months to show at a time @@ -75,6 +76,8 @@ _create:function(){ var calendar, interval, that = this; + + this.options.dateFormat = this.element.data('format'); if( this.options.inline ){ this.options.altField = this.element; calendar = $("
").datepicker(this.options);