diff --git a/experiments/ui-datepicker/jquery.ui.datepicker.mobile.js b/experiments/ui-datepicker/jquery.ui.datepicker.mobile.js index 9649cc6539b..0ea52ebc34b 100644 --- a/experiments/ui-datepicker/jquery.ui.datepicker.mobile.js +++ b/experiments/ui-datepicker/jquery.ui.datepicker.mobile.js @@ -15,7 +15,7 @@ var dp = this; //call cached datepicker plugin - prevDp.call( this, options ); + prevDp.apply( this, arguments ); //extend with some dom manipulation to update the markup for jQM //call immediately @@ -49,7 +49,7 @@ //bind to pagecreate to automatically enhance date inputs $( ".ui-page" ).live( "pagecreate", function(){ $( "input[type='date'], input:jqmData(type='date')" ).each(function(){ - $(this).after( $( "
" ).datepicker({ altField: "#" + $(this).attr( "id" ), showOtherMonths: true }) ); + $(this).after( $( "
" ).datepicker({ altField: "#" + $(this).attr( "id" ), showOtherMonths: true, defaultDate: $(this).val() }) ); }); }); -})( jQuery ); \ No newline at end of file +})( jQuery );