Skip to content
Permalink
Browse files

Fixed #2658 Next link shows > when hideIfNoPrevNext is true

Fixed #2700 Datepicker does not allow manual entry of alphabetic characters
Fixed #2724 Date range + restricting allows invalid range
  • Loading branch information
Keith Wood
Keith Wood committed Jun 16, 2008
1 parent 54adcb9 commit 5a920d2b48caefd0cdd29bc031530eee4205c237
Showing with 5 additions and 4 deletions.
  1. +5 −4 ui/ui.datepicker.js
@@ -961,10 +961,10 @@ $.extend(Datepicker.prototype, {
chars += format.charAt(iFormat);
else
switch (format.charAt(iFormat)) {
case 'd' || 'm' || 'y':
case 'd': case 'm': case 'y':
chars += '0123456789';
break;
case 'D' || 'M':
case 'D': case 'M':
return null; // Accept anything
case "'":
if (lookAhead("'"))
@@ -1161,7 +1161,7 @@ $.extend(DatepickerInstance.prototype, {
'<a onclick="jQuery.datepicker._adjustDate(' + this._id + ', +' + stepMonths + ', \'M\');"' +
(showStatus ? this._addStatus(this._get('nextStatus') || '&#xa0;') : '') + '>' +
this._get('nextText') + '</a>' :
(hideIfNoPrevNext ? '>' : '<label>' + this._get('nextText') + '</label>')) + '</div>';
(hideIfNoPrevNext ? '' : '<label>' + this._get('nextText') + '</label>')) + '</div>';
var html = (prompt ? '<div class="' + $.datepicker._promptClass + '">' + prompt + '</div>' : '') +
(closeAtTop && !this._inline ? controls : '') +
'<div class="ui-datepicker-links">' + (isRTL ? next : prev) +
@@ -1368,7 +1368,8 @@ $.extend(DatepickerInstance.prototype, {
date.setSeconds(0);
date.setMilliseconds(0);
}
return date || (checkRange ? this._rangeStart : null);
return (!checkRange || !this._rangeStart ? date :
(!date || this._rangeStart > date ? this._rangeStart : date));
},

/* Find the number of days in a given month. */

0 comments on commit 5a920d2

Please sign in to comment.
You can’t perform that action at this time.