Changeset 290

Show
Ignore:
Timestamp:
06/16/08 05:46:11 (6 months ago)
Author:
kbwood.au
Message:

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

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/ui/ui.datepicker.js

    r285 r290  
    962962                        else 
    963963                                switch (format.charAt(iFormat)) { 
    964                                         case 'd' || 'm' || 'y': 
     964                                        case 'd': case 'm': case 'y': 
    965965                                                chars += '0123456789';  
    966966                                                break; 
    967                                         case 'D' || 'M': 
     967                                        case 'D': case 'M': 
    968968                                                return null; // Accept anything 
    969969                                        case "'": 
     
    11621162                        (showStatus ? this._addStatus(this._get('nextStatus') || ' ') : '') + '>' + 
    11631163                        this._get('nextText') + '</a>' : 
    1164                         (hideIfNoPrevNext ? '>' : '<label>' + this._get('nextText') + '</label>')) + '</div>'; 
     1164                        (hideIfNoPrevNext ? '' : '<label>' + this._get('nextText') + '</label>')) + '</div>'; 
    11651165                var html = (prompt ? '<div class="' + $.datepicker._promptClass + '">' + prompt + '</div>' : '') + 
    11661166                        (closeAtTop && !this._inline ? controls : '') + 
     
    13691369                        date.setMilliseconds(0); 
    13701370                } 
    1371                 return date || (checkRange ? this._rangeStart : null); 
     1371                return (!checkRange || !this._rangeStart ? date : 
     1372                        (!date || this._rangeStart > date ? this._rangeStart : date)); 
    13721373        }, 
    13731374