--- a/busui/js/jquery.ui.datepicker.mobile.js +++ b/busui/js/jquery.ui.datepicker.mobile.js @@ -47,9 +47,12 @@ }; //bind to pagecreate to automatically enhance date inputs - $( ".ui-page" ).live( "pagecreate", function(){ + $( ".ui-page" ).live( "pagecreate", function(){ $( "input[type='date'], input[data-type='date']" ).each(function(){ + if ($(this).hasClass("hasDatepicker") == false) { $(this).after( $( "
" ).datepicker({ altField: "#" + $(this).attr( "id" ), showOtherMonths: true }) ); - }); - }); + $(this).addClass("hasDatepicker"); + } + }); + }); })( jQuery );