Permalink
Browse files

The each callback in the pagecreate method was creating multiple cale…

…ndars when used with a multi-page html file because it was not scoped to the current page but instead to the entire document.
  • Loading branch information...
1 parent 91f5a34 commit ae8b1c45fc3ce54242d94c041fef2a884370cc81 @edelabar edelabar committed May 2, 2011
Showing with 1 addition and 1 deletion.
  1. +1 −1 experiments/ui-datepicker/jquery.ui.datepicker.mobile.js
@@ -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 }) );
});
});

0 comments on commit ae8b1c4

Please sign in to comment.