Changeset 4289
- Timestamp:
- 12/21/07 00:48:41 (1 year ago)
- Location:
- trunk/ui/current/datepicker/core
- Files:
-
- 2 modified
-
index.html (modified) (1 diff)
-
ui.datepicker.js (modified) (8 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ui/current/datepicker/core/index.html
r3759 r4289 15 15 <!-- Attach the datepicker to dateinput after document is ready --> 16 16 <script type="text/javascript" charset="utf-8"> 17 $(document).ready(function(){17 jQuery(function($){ 18 18 $("#dateinput").datepicker(); 19 19 }); -
trunk/ui/current/datepicker/core/ui.datepicker.js
r4249 r4289 225 225 input[0]._calId = inst._id; 226 226 this._updateDatepicker(inst); 227 inst._datepickerDiv.resize(function() { $.datepicker._inlineShow(inst); }); 227 /* @todo: fix _inlineShow automatic resizing 228 - Endless loop bug in IE6. 229 - inst._datepickerDiv.resize doesn't ever fire in firefox. */ 230 // inst._datepickerDiv.resize(function() { $.datepicker._inlineShow(inst); }); 228 231 }, 229 232 … … 233 236 numMonths = (numMonths == null ? 1 : (typeof numMonths == 'number' ? numMonths : numMonths[1])); 234 237 inst._datepickerDiv.width(numMonths * $('.datepicker', inst._datepickerDiv[0]).width()); 235 }, 238 }, 236 239 237 240 /* Does this element have a particular class? */ … … 479 482 numMonths = (numMonths == null ? 1 : (typeof numMonths == 'number' ? numMonths : numMonths[1])); 480 483 inst._datepickerDiv.width(numMonths * $('.datepicker', inst._datepickerDiv[0]).width()); 481 if ($.browser.msie ) { // fix IE < 7 select problems484 if ($.browser.msie && parseInt($.browser.version) < 7) { // fix IE < 7 select problems 482 485 $('#datepicker_cover').css({width: inst._datepickerDiv.width() + 4, 483 486 height: inst._datepickerDiv.height() + 4}); … … 485 488 // re-position on screen if necessary 486 489 var isFixed = inst._datepickerDiv.css('position') == 'fixed'; 487 var pos = $.datepicker._findPos(inst._input[0]);490 var pos = inst._input ? $.datepicker._findPos(inst._input[0]) : null; 488 491 var browserWidth = window.innerWidth || document.documentElement.clientWidth || 489 492 document.body.clientWidth; … … 497 500 (browserWidth + scrollX)) { 498 501 inst._datepickerDiv.css('left', Math.max(scrollX, 499 pos[0] + $(inst._input[0]).width() - inst._datepickerDiv.width() -502 pos[0] + (inst._input ? $(inst._input[0]).width() : null) - inst._datepickerDiv.width() - 500 503 (isFixed && $.browser.opera ? document.documentElement.scrollLeft : 0)) + 'px'); 501 504 } … … 694 697 } 695 698 else { 696 inst._input.trigger('change'); // fire the change event 699 if (inst._input) { 700 inst._input.trigger('change'); // fire the change event 701 } 697 702 } 698 703 if (inst._inline) { … … 1049 1054 this._input = $(input); 1050 1055 var dateFormat = this._get('dateFormat'); 1051 var dates = this._input.val().split(this._get('rangeSeparator'));1056 var dates = inst._input ? this._input.val().split(this._get('rangeSeparator')) : null; 1052 1057 this._endDay = this._endMonth = this._endYear = null; 1053 1058 var shortYearCutoff = this._get('shortYearCutoff'); … … 1248 1253 '" class="datepicker_status">' + this._get('initStatus') + '</div>' : '') + 1249 1254 (!closeAtTop && !this._inline ? controls : '') + 1250 '<div style="clear: both;"></div>' + (!$.browser.msie ? '' : 1251 '<!--[if lte IE 6.5]><iframe src="javascript:false;" class="datepicker_cover"></iframe><![endif]-->'); 1255 '<div style="clear: both;"></div>' + 1256 ($.browser.msie && parseInt($.browser.version) < 7 && !this._inline ? '' : 1257 '<iframe src="javascript:false;" class="datepicker_cover"></iframe>'); 1252 1258 return html; 1253 1259 },
