Custom Query (7259 matches)

Filters
 
Or
 
  
 
Columns

Show under each result:


Results (91 - 93 of 7259)

Ticket Resolution Summary Owner Reporter
#1996 fixed datepicker - next/prev with multiple months and min/max kbwood emielroelofsen
Description

The function _canAdjustMonth is't correct.

Example

I want to show 3 months ( numberOfMonths: 3 )
My minimum date is 2008-01-26 ( minDate: new Date(2008, 1 - 1, 26) )
My maximum date is 2008-04-27 ( minDate: new Date(2008, 4 - 1, 27) )
hideIfNoPrevNext is set to true

Because of the bug in the function _canAdjustMonth I can press the next button until juni 2008. The solution is also to calculate the numberOfMonths.

Solution

OLD FUNCTOIN

_canAdjustMonth: function(offset) {            
   var date = new Date(this._selectedYear, this._selectedMonth + offset, 1);
   if (offset < 0) {
      date.setDate(this._getDaysInMonth(date.getFullYear(), date.getMonth()));
   }
   return this._isInRange(date);
},

NEW FUNCTION

_canAdjustMonth: function(offset) {            
   var month = offset > 0 ? 
      this._selectedMonth + offset + this._get('numberOfMonths') - 1 :
      this._selectedMonth + offset;
   var date = new Date(this._selectedYear, month, 1);
   if (offset < 0) {
      date.setDate(this._getDaysInMonth(date.getFullYear(), date.getMonth()));
   }
   return this._isInRange(date);
},

Emiel Roelofsen

#1998 fixed UI.DatePicker is positioned incorrectly in a scrolling div DaveJamesMiller
Description

I have a field with UI.DatePicker attached inside a scrolling div, and when you scroll down in the DIV, the popup shows in the wrong place. I made the following change - it seems to work for me in IE7, FF2, Opera, but I do not know if there will be any side effects or problems in other browsers.

	/* Find an object's position on the screen. */
	_findPos: function(obj) {
		while (obj && (obj.type == 'hidden' || obj.nodeType != 1)) {
			obj = obj.nextSibling;
		}
		// START HACK -DJM
		var pos = $(obj).offset();
		return [pos.left, pos.top];
		// END HACK -DJM
		// -SNIP-
	}

The HTML is something like this:

<div style="overflow: auto; height: 200px">
<br /><br /><br /><br /><br />
<input name="date" />
<br /><br /><br /><br /><br />
</div>
#2001 fixed syntax error iMarc sinosaga
Description

when my mouse is over a date happen syntax error, my browser: firefox 2.0.11, firebug

<td onclick="jQuery.datepicker._selectDay(0,10,2007, this);" );="" datepicker_dayscellover="" jquery(this).removeclass(="" onmouseover="jQuery(this).addClass('datepicker_daysCellOver'); onmouseout=" class="datepicker_daysCell datepicker_daysCellOver datepicker_currentDay"><a>5</a></td>
Note: See TracQuery for help on using queries.