Ticket #2832: datepicker.patch
File datepicker.patch, 2.1 KB (added by , 14 years ago) |
---|
-
ui.datepicker.js
251 251 Date[2] - the current dates for a range */ 252 252 _getDateDatepicker: function(target) { 253 253 var inst = this._getInst(target._calId); 254 255 if ( inst ) 256 { 257 inst._setDateFromField($(target)); 258 } 259 254 260 return (inst ? inst._getDate() : null); 255 261 }, 256 262 263 _isDateInRangeDatepicker: function(target) { 264 var inst = this._getInst(target._calId); 265 266 return (inst ? inst._isInRange(this._getDateDatepicker(target)) : null); 267 }, 268 269 _isMinDateDatepicker: function(target) { 270 var inst = this._getInst(target._calId); 271 var date = this._getDateDatepicker(target); 272 var minDate = inst._getMinMaxDate('min', true); 273 274 return (!minDate || date >= minDate); 275 }, 276 277 _isMaxDateDatepicker: function(target) { 278 var inst = this._getInst(target._calId); 279 var date = this._getDateDatepicker(target); 280 var maxDate = inst._getMinMaxDate('max', true); 281 282 return (!maxDate || date <= maxDate); 283 }, 284 257 285 /* Handle keystrokes. */ 258 286 _doKeyDown: function(e) { 259 287 var inst = $.datepicker._getInst(this._calId); … … 723 751 dateStatus: function(date, inst) { 724 752 return $.datepicker.formatDate(inst._get('dateStatus'), date, inst._getFormatConfig()); 725 753 }, 726 754 727 755 /* Parse a string value into a date object. 728 756 The format can be combinations of the following: 729 757 d - day of month (no leading zero) … … 1418 1446 @return jQuery object */ 1419 1447 $.fn.datepicker = function(options){ 1420 1448 var otherArgs = Array.prototype.slice.call(arguments, 1); 1421 if (typeof options == 'string' && (options == 'isDisabled' || options == 'getDate' )) {1449 if (typeof options == 'string' && (options == 'isDisabled' || options == 'getDate' || options == 'isDateInRange' || options == 'isMinDate'|| options == 'isMaxDate' )) { 1422 1450 return $.datepicker['_' + options + 'Datepicker'].apply($.datepicker, [this[0]].concat(otherArgs)); 1423 1451 } 1424 1452 return this.each(function() {