diff options
author | Keith Wood <kbwood.au@gmail.com> | 2008-06-16 12:46:11 +0000 |
---|---|---|
committer | Keith Wood <kbwood.au@gmail.com> | 2008-06-16 12:46:11 +0000 |
commit | 5a920d2b48caefd0cdd29bc031530eee4205c237 (patch) | |
tree | 8c908862ca61b59deea8d520ef10e924e60f036c /ui/ui.datepicker.js | |
parent | 54adcb95022522f64512acdb25563d08d6f819ae (diff) | |
download | jquery-ui-5a920d2b48caefd0cdd29bc031530eee4205c237.tar.gz jquery-ui-5a920d2b48caefd0cdd29bc031530eee4205c237.zip |
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
Diffstat (limited to 'ui/ui.datepicker.js')
-rw-r--r-- | ui/ui.datepicker.js | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/ui/ui.datepicker.js b/ui/ui.datepicker.js index 643f6de04..4a5447671 100644 --- a/ui/ui.datepicker.js +++ b/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') || ' ') : '') + '>' + 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. */ |