The each callback in the pagecreate method was creating multiple calendars when used with a multi-page html file because it was not scoped to the current page but instead to the entire document.

This commit is contained in:
Eric DeLabar 2011-05-02 08:22:26 -07:00
parent 91f5a3492b
commit ae8b1c45fc

View file

@ -48,7 +48,7 @@
//bind to pagecreate to automatically enhance date inputs
$( ".ui-page" ).live( "pagecreate", function(){
$( "input[type='date'], input:jqmData(type='date')" ).each(function(){
$( "input[type='date'], input:jqmData(type='date')", this ).each(function(){
$(this).after( $( "<div />" ).datepicker({ altField: "#" + $(this).attr( "id" ), showOtherMonths: true }) );
});
});