diff options
-rw-r--r-- | demos/datepicker/other-months.html | 9 | ||||
-rw-r--r-- | external/date.js | 5 | ||||
-rw-r--r-- | ui/datepicker.js | 4 |
3 files changed, 12 insertions, 6 deletions
diff --git a/demos/datepicker/other-months.html b/demos/datepicker/other-months.html index bad2b1977..bfb3f1af3 100644 --- a/demos/datepicker/other-months.html +++ b/demos/datepicker/other-months.html @@ -17,8 +17,13 @@ <script> $(function() { $( "#datepicker" ).datepicker({ - showOtherMonths: true, - selectOtherMonths: true + eachDay: function( day ) { + if ( day.lead ) { + day.render = true; + day.selectable = true; + day.extraClasses = "ui-priority-secondary"; + } + } }); }); </script> diff --git a/external/date.js b/external/date.js index 23efeef70..fef4dcaef 100644 --- a/external/date.js +++ b/external/date.js @@ -130,8 +130,9 @@ $.date = function( datestring, formatstring ) { today: today.equal( printDate ) }; day.render = day.selectable = !day.lead; - // TODO undefined in picker demos, fix it - // this.eachDay( day ); + if ( this.eachDay ) { + this.eachDay( day ); + } // TODO use adjust("D", 1)? printDate.setDate( printDate.getDate() + 1 ); } diff --git a/ui/datepicker.js b/ui/datepicker.js index f1b9dc6c0..625991d88 100644 --- a/ui/datepicker.js +++ b/ui/datepicker.js @@ -476,7 +476,7 @@ $.widget( "ui.datepicker", { classes.push( "ui-state-highlight" ); } if ( day.extraClasses ) { - classes.push( day.extraClasses.split( "" ) ); + classes.push( day.extraClasses.split( " " ) ); } link = "<a href='#' tabindex='-1' data-timestamp='" + day.timestamp + "' class='" + classes.join( " " ) + "'>" + @@ -495,7 +495,7 @@ $.widget( "ui.datepicker", { classes.push( "ui-state-highlight" ); } if ( day.extraClasses ) { - classes.push( day.extraClasses.split( "" ) ); + classes.push( day.extraClasses.split( " " ) ); } return "<span class='" + classes.join( "" ) + "'>" + |