aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKeith Wood <kbwood.au@gmail.com>2008-06-12 11:59:39 +0000
committerKeith Wood <kbwood.au@gmail.com>2008-06-12 11:59:39 +0000
commitad02703d37269b42870b9794a298e2254aac29e6 (patch)
tree49e65d9722df25f1b26cdddabb3b1368e067fb0a
parent77e8d0f60b6a63ecd8613b6f57ebb1f9a63aac2a (diff)
downloadjquery-ui-ad02703d37269b42870b9794a298e2254aac29e6.tar.gz
jquery-ui-ad02703d37269b42870b9794a298e2254aac29e6.zip
Allow setting of cell title via beforeShowDay
-rw-r--r--ui/ui.datepicker.js4
1 files changed, 3 insertions, 1 deletions
diff --git a/ui/ui.datepicker.js b/ui/ui.datepicker.js
index f096a5427..2c1a7378d 100644
--- a/ui/ui.datepicker.js
+++ b/ui/ui.datepicker.js
@@ -98,7 +98,8 @@ function Datepicker() {
speed: 'normal', // Speed of display/closure
beforeShowDay: null, // Function that takes a date and returns an array with
// [0] = true if selectable, false if not,
- // [1] = custom CSS class name(s) or '', e.g. $.datepicker.noWeekends
+ // [1] = custom CSS class name(s) or '',
+ // [2] = cell title (optional), e.g. $.datepicker.noWeekends
beforeShow: null, // Function that takes an input field and
// returns a set of custom settings for the date picker
onSelect: null, // Define a callback function when a date is selected
@@ -1217,6 +1218,7 @@ $.extend(DatepickerInstance.prototype, {
(printDate.getTime() >= currentDate.getTime() && printDate.getTime() <= endDate.getTime() ? // in current range
' ui-datepicker-current-day' : '') + // highlight selected day
(printDate.getTime() == today.getTime() ? ' ui-datepicker-today' : '')) + '"' + // highlight today (if different)
+ ((!otherMonth || showOtherMonths) && daySettings[2] ? ' title="' + daySettings[2] + '"' : '') + // cell title
(unselectable ? '' : ' onmouseover="jQuery(this).addClass(\'ui-datepicker-days-cell-over\');' +
(!showStatus || (otherMonth && !showOtherMonths) ? '' : 'jQuery(\'#ui-datepicker-status-' +
this._id + '\').html(\'' + (dateStatus.apply((this._input ? this._input[0] : null),