Fixed #3709 - Datepicker: clicking on a date causes the browser to follow '#' anchor

This commit is contained in:
Richard Worth 2008-12-31 17:23:10 +00:00
parent 043fe4f79d
commit 0b9227475c

View File

@ -1383,7 +1383,7 @@ $.extend(Datepicker.prototype, {
' ' + this._currentClass : '') + // highlight selected day ' ' + this._currentClass : '') + // highlight selected day
(printDate.getTime() == today.getTime() ? ' ui-datepicker-today' : '')) + '"' + // highlight today (if different) (printDate.getTime() == today.getTime() ? ' ui-datepicker-today' : '')) + '"' + // highlight today (if different)
((!otherMonth || showOtherMonths) && daySettings[2] ? ' title="' + daySettings[2] + '"' : '') + // cell title ((!otherMonth || showOtherMonths) && daySettings[2] ? ' title="' + daySettings[2] + '"' : '') + // cell title
(unselectable ? '' : ' onclick="jQuery.datepicker._selectDay(\'#' + (unselectable ? '' : ' onclick="event.preventDefault();jQuery.datepicker._selectDay(\'#' +
inst.id + '\',' + drawMonth + ',' + drawYear + ', this);"') + '>' + // actions inst.id + '\',' + drawMonth + ',' + drawYear + ', this);"') + '>' + // actions
(otherMonth ? (showOtherMonths ? printDate.getDate() : ' ') : // display for other months (otherMonth ? (showOtherMonths ? printDate.getDate() : ' ') : // display for other months
(unselectable ? printDate.getDate() : '<a class="ui-state-default' + (unselectable ? printDate.getDate() : '<a class="ui-state-default' +