Skip to main content

Search and Top Navigation

Ticket #3662: datepicker.patch
File datepicker.patch, 8.9 KB (added by leemhenson, December 12, 2008 01:45PM UTC)
Index: ui/ui.datepicker.js
===================================================================
--- ui/ui.datepicker.js	(revision 1110)
+++ ui/ui.datepicker.js	(working copy)
@@ -128,7 +128,8 @@
 		rangeSeparator: ' - ', // Text between two dates in a range
 		altField: '', // Selector for an alternate field to store selected dates into
 		altFormat: '', // The date format to use for the alternate field
-		constrainInput: true // The input is constrained by the current date format
+		constrainInput: true, // The input is constrained by the current date format
+		cancelBubbling: false // True to stop click events bubbling out of the datepicker, false to allow them
 	};
 	$.extend(this._defaults, this.regional['']);
 	this.dpDiv = $('');
@@ -1349,11 +1350,11 @@
 		var isRTL = this._get(inst, 'isRTL');
 		// build the date picker HTML
 		var clear = (this._get(inst, 'mandatory') ? '' :
-			'');
 		var controls = '
' + (isRTL ? '' : clear) + - '' + (isRTL ? clear : '') + '
'; var prompt = this._get(inst, 'prompt'); @@ -1398,9 +1399,9 @@ this._daylightSavingAdjust(new Date(drawYear, drawMonth - stepBigMonths, 1)), this._getFormatConfig(inst))); var prev = '
' + (this._canAdjustMonth(inst, -1, drawYear, drawMonth) ? - (showBigPrevNext ? '' + prevBigText + '' : '') + - '' + prevText + '' : (hideIfNoPrevNext ? '' : (showBigPrevNext ? '' : '') + '')) + '
'; @@ -1413,9 +1414,9 @@ this._daylightSavingAdjust(new Date(drawYear, drawMonth + stepBigMonths, 1)), this._getFormatConfig(inst))); var next = '
' + (this._canAdjustMonth(inst, +1, drawYear, drawMonth) ? - '' + nextText + '' + - (showBigPrevNext ? '' + nextBigText + '' : '') : (hideIfNoPrevNext ? '' : '' + (showBigPrevNext ? '' : ''))) + '
'; @@ -1426,7 +1427,7 @@ var html = (closeAtTop && !inst.inline ? controls : '') + '' + (prompt ? '
' + prompt + '
' : ''); @@ -1464,7 +1465,7 @@ status.replace(/D/, dayNamesShort[day])); html += '= 5 ? ' class="ui-datepicker-week-end-cell"' : '') + '>' + (!changeFirstDay ? '' + dayNamesMin[day] + (changeFirstDay ? '' : '') + ''; } @@ -1510,7 +1511,7 @@ (highlightWeek ? '.parent().removeClass(\'' + this._weekOverClass + '\')' : '') + ';' + // unhighlight selection week (!showStatus || (otherMonth && !showOtherMonths) ? '' : 'jQuery(\'#ui-datepicker-status-' + inst.id + '\').html(\'' + initStatus + '\');') + '" onclick="jQuery.datepicker._selectDay(\'#' + - inst.id + '\',' + drawMonth + ',' + drawYear + ', this);"') + '>' + // actions + inst.id + '\',' + drawMonth + ',' + drawYear + ', this); jQuery.datepicker._cancelBubbling(\'#' + inst.id + '\', event);"') + '>' + // actions (otherMonth ? (showOtherMonths ? printDate.getDate() : ' ') : // display for other months (unselectable ? printDate.getDate() : '' + printDate.getDate() + '')) + ''; // display for this month printDate.setDate(printDate.getDate() + 1); @@ -1551,8 +1552,8 @@ var inMinYear = (minDate && minDate.getFullYear() == drawYear); var inMaxYear = (maxDate && maxDate.getFullYear() == drawYear); monthHtml += '

Download in other formats:

Original Format