function _togglePrevNext(bSkipMonthCheck){

		var oDate = new UniversalDate(_getStartDate.call(this).getTime());
		var iItems = this._getItems();
		var iYear = oDate.getJSDate().getUTCFullYear();
		var iYearMax = this._oMaxDate.getJSDate().getUTCFullYear();
		var iYearMin = this._oMinDate.getJSDate().getUTCFullYear();
		var iMonth = oDate.getJSDate().getUTCMonth();
		var iMonthMax = this._oMaxDate.getJSDate().getUTCMonth();
		var iMonthMin = this._oMinDate.getJSDate().getUTCMonth();
		var iDate = oDate.getJSDate().getUTCDate();
		var iDateMax = this._oMaxDate.getJSDate().getUTCDate();
		var iDateMin = this._oMinDate.getJSDate().getUTCDate();
		var iHours = oDate.getJSDate().getUTCHours();
		var iHoursMax = this._oMaxDate.getJSDate().getUTCHours();
		var iHoursMin = this._oMinDate.getJSDate().getUTCHours();
		var iMinutes = oDate.getJSDate().getUTCMinutes();
		var iMinutesMax = this._oMaxDate.getJSDate().getUTCMinutes();
		var iMinutesMin = this._oMinDate.getJSDate().getUTCMinutes();
		var oHeader = this.getAggregation("header");

		if (this._iMode == 2 && !bSkipMonthCheck) {
			// in line month picker don't disable buttons
			var oMonthPicker = this._getMonthPicker();
			var iMonths = oMonthPicker.getMonths();
			var iStartMonth = oMonthPicker.getStartMonth();
			var iEndMonth = iStartMonth + iMonths - 1;

			if (iStartMonth == 0 || (iYear == iYearMin && iStartMonth <= iMonthMin)) {
				oHeader.setEnabledPrevious(false);
			} else {
				oHeader.setEnabledPrevious(true);
			}

			if (iEndMonth > 10 || (iYear == iYearMax && iEndMonth >= iMonthMax)) {
				oHeader.setEnabledNext(false);
			} else {
				oHeader.setEnabledNext(true);
			}

			return;
		}

		if ((iYear < iYearMin ||
				(iYear == iYearMin && ( bSkipMonthCheck || ( iMonth < iMonthMin ||
						(iMonth == iMonthMin && (iDate < iDateMin ||
								(iDate == iDateMin && (iHours < iHoursMin ||
										(iHours == iHoursMin && iMinutes <= iMinutesMin)))))))))
				|| ((this._iMode == 1 || this._iMode == 2) && this.getPickerPopup())) {
			oHeader.setEnabledPrevious(false);
		} else  {
			oHeader.setEnabledPrevious(true);
		}

		oDate.setUTCMinutes(oDate.getUTCMinutes() + (iItems) * this.getIntervalMinutes() - 1);
		iYear = oDate.getJSDate().getUTCFullYear();
		iMonth = oDate.getJSDate().getUTCMonth();
		iDate = oDate.getJSDate().getUTCDate();
		iHours = oDate.getJSDate().getUTCHours();
		iMinutes = oDate.getJSDate().getUTCMinutes();
		if ((iYear > iYearMax ||
				(iYear == iYearMax && ( !bSkipMonthCheck || ( iMonth > iMonthMax ||
						(iMonth == iMonthMax && (iDate > iDateMax ||
								(iDate == iDateMax && (iHours > iHoursMax ||
										(iHours == iHoursMax && iMinutes >= iMinutesMax)))))))))
				|| ((this._iMode == 1 || this._iMode == 2) && this.getPickerPopup())) {
			oHeader.setEnabledNext(false);
		} else  {
			oHeader.setEnabledNext(true);
		}

		if (this._iMode === 1) {
			var oLastDayOfMonth = new UniversalDate(oDate.getTime());
			oLastDayOfMonth.setUTCDate(1);
			oLastDayOfMonth.setUTCMonth(oLastDayOfMonth.getUTCMonth() + 1);
			oLastDayOfMonth.setUTCDate(0);
			var iDays = this.getAggregation("datesRow").getDays();
			oDate.setUTCDate( 1 + (Math.ceil(oDate.getUTCDate() / iDays) - 1) * iDays );
			if (oLastDayOfMonth.getUTCDate() - oDate.getUTCDate() < iDays) {
				oDate.setUTCDate(oLastDayOfMonth.getUTCDate() - iDays + 1);
			}
			iDate = oDate.getUTCDate();
			if (iDate <= 1 || (iYear == iYearMin && iMonth == iMonthMin && iDate <= iDateMin)) {
				oHeader.setEnabledPrevious(false);
			} else {
				oHeader.setEnabledPrevious(true);
			}

			if ((iDate + iDays) >= oLastDayOfMonth.getUTCDate() || (iYear == iYearMax && iMonth == iMonthMax && iDate >= iDateMax)) {
				oHeader.setEnabledNext(false);
			} else {
				oHeader.setEnabledNext(true);
			}
		}

	}
/**
	 * Enables / Disables previous and next button in the Header.
	 * This function assumes there is a "monthPicker" aggregation unless the bSkipMonthCheck flag is false.
	 * So callers must take care.
	 * @param {boolean} bSkipMonthCheck if month picker should be examined or not
	 * @return {void}
	 * @private
	 */
Enables / Disables previous and next button in the Header.
This function assumes there is a "monthPicker" aggregation unless the bSkipMonthCheck flag is false.
So callers must take care.
@param {boolean} bSkipMonthCheck if month picker should be examined or not
@return {void}
@private
Enables / Disables previous and next button in the Header . This function assumes there is a " monthPicker " aggregation unless the bSkipMonthCheck flag is false . So callers must take care . @param { boolean } bSkipMonthCheck if month picker should be examined or not @return { void } @private
function _togglePrevNext(bSkipMonthCheck){
		var oDate = new UniversalDate(_getStartDate.call(this).getTime());
		var iItems = this._getItems();
		var iYear = oDate.getJSDate().getUTCFullYear();
		var iYearMax = this._oMaxDate.getJSDate().getUTCFullYear();
		var iYearMin = this._oMinDate.getJSDate().getUTCFullYear();
		var iMonth = oDate.getJSDate().getUTCMonth();
		var iMonthMax = this._oMaxDate.getJSDate().getUTCMonth();
		var iMonthMin = this._oMinDate.getJSDate().getUTCMonth();
		var iDate = oDate.getJSDate().getUTCDate();
		var iDateMax = this._oMaxDate.getJSDate().getUTCDate();
		var iDateMin = this._oMinDate.getJSDate().getUTCDate();
		var iHours = oDate.getJSDate().getUTCHours();
		var iHoursMax = this._oMaxDate.getJSDate().getUTCHours();
		var iHoursMin = this._oMinDate.getJSDate().getUTCHours();
		var iMinutes = oDate.getJSDate().getUTCMinutes();
		var iMinutesMax = this._oMaxDate.getJSDate().getUTCMinutes();
		var iMinutesMin = this._oMinDate.getJSDate().getUTCMinutes();
		var oHeader = this.getAggregation("header");
		if (this._iMode == 2 && !bSkipMonthCheck) {
			var oMonthPicker = this._getMonthPicker();
			var iMonths = oMonthPicker.getMonths();
			var iStartMonth = oMonthPicker.getStartMonth();
			var iEndMonth = iStartMonth + iMonths - 1;
			if (iStartMonth == 0 || (iYear == iYearMin && iStartMonth <= iMonthMin)) {
				oHeader.setEnabledPrevious(false);
			} else {
				oHeader.setEnabledPrevious(true);
			}
			if (iEndMonth > 10 || (iYear == iYearMax && iEndMonth >= iMonthMax)) {
				oHeader.setEnabledNext(false);
			} else {
				oHeader.setEnabledNext(true);
			}
			return;
		}
		if ((iYear < iYearMin ||
				(iYear == iYearMin && ( bSkipMonthCheck || ( iMonth < iMonthMin ||
						(iMonth == iMonthMin && (iDate < iDateMin ||
								(iDate == iDateMin && (iHours < iHoursMin ||
										(iHours == iHoursMin && iMinutes <= iMinutesMin)))))))))
				|| ((this._iMode == 1 || this._iMode == 2) && this.getPickerPopup())) {
			oHeader.setEnabledPrevious(false);
		} else  {
			oHeader.setEnabledPrevious(true);
		}
		oDate.setUTCMinutes(oDate.getUTCMinutes() + (iItems) * this.getIntervalMinutes() - 1);
		iYear = oDate.getJSDate().getUTCFullYear();
		iMonth = oDate.getJSDate().getUTCMonth();
		iDate = oDate.getJSDate().getUTCDate();
		iHours = oDate.getJSDate().getUTCHours();
		iMinutes = oDate.getJSDate().getUTCMinutes();
		if ((iYear > iYearMax ||
				(iYear == iYearMax && ( !bSkipMonthCheck || ( iMonth > iMonthMax ||
						(iMonth == iMonthMax && (iDate > iDateMax ||
								(iDate == iDateMax && (iHours > iHoursMax ||
										(iHours == iHoursMax && iMinutes >= iMinutesMax)))))))))
				|| ((this._iMode == 1 || this._iMode == 2) && this.getPickerPopup())) {
			oHeader.setEnabledNext(false);
		} else  {
			oHeader.setEnabledNext(true);
		}
		if (this._iMode === 1) {
			var oLastDayOfMonth = new UniversalDate(oDate.getTime());
			oLastDayOfMonth.setUTCDate(1);
			oLastDayOfMonth.setUTCMonth(oLastDayOfMonth.getUTCMonth() + 1);
			oLastDayOfMonth.setUTCDate(0);
			var iDays = this.getAggregation("datesRow").getDays();
			oDate.setUTCDate( 1 + (Math.ceil(oDate.getUTCDate() / iDays) - 1) * iDays );
			if (oLastDayOfMonth.getUTCDate() - oDate.getUTCDate() < iDays) {
				oDate.setUTCDate(oLastDayOfMonth.getUTCDate() - iDays + 1);
			}
			iDate = oDate.getUTCDate();
			if (iDate <= 1 || (iYear == iYearMin && iMonth == iMonthMin && iDate <= iDateMin)) {
				oHeader.setEnabledPrevious(false);
			} else {
				oHeader.setEnabledPrevious(true);
			}
			if ((iDate + iDays) >= oLastDayOfMonth.getUTCDate() || (iYear == iYearMax && iMonth == iMonthMax && iDate >= iDateMax)) {
				oHeader.setEnabledNext(false);
			} else {
				oHeader.setEnabledNext(true);
			}
		}
	}
function _togglePrevNext ( bSkipMonthCheck ) { var oDate = new UniversalDate ( _getStartDate . call ( this ) . getTime ( ) ) ; var iItems = this . _getItems ( ) ; var iYear = oDate . getJSDate ( ) . getUTCFullYear ( ) ; var iYearMax = this . _oMaxDate . getJSDate ( ) . getUTCFullYear ( ) ; var iYearMin = this . _oMinDate . getJSDate ( ) . getUTCFullYear ( ) ; var iMonth = oDate . getJSDate ( ) . getUTCMonth ( ) ; var iMonthMax = this . _oMaxDate . getJSDate ( ) . getUTCMonth ( ) ; var iMonthMin = this . _oMinDate . getJSDate ( ) . getUTCMonth ( ) ; var iDate = oDate . getJSDate ( ) . getUTCDate ( ) ; var iDateMax = this . _oMaxDate . getJSDate ( ) . getUTCDate ( ) ; var iDateMin = this . _oMinDate . getJSDate ( ) . getUTCDate ( ) ; var iHours = oDate . getJSDate ( ) . getUTCHours ( ) ; var iHoursMax = this . _oMaxDate . getJSDate ( ) . getUTCHours ( ) ; var iHoursMin = this . _oMinDate . getJSDate ( ) . getUTCHours ( ) ; var iMinutes = oDate . getJSDate ( ) . getUTCMinutes ( ) ; var iMinutesMax = this . _oMaxDate . getJSDate ( ) . getUTCMinutes ( ) ; var iMinutesMin = this . _oMinDate . getJSDate ( ) . getUTCMinutes ( ) ; var oHeader = this . getAggregation ( "header" ) ; if ( this . _iMode == 2 && ! bSkipMonthCheck ) { var oMonthPicker = this . _getMonthPicker ( ) ; var iMonths = oMonthPicker . getMonths ( ) ; var iStartMonth = oMonthPicker . getStartMonth ( ) ; var iEndMonth = iStartMonth + iMonths - 1 ; if ( iStartMonth == 0 || ( iYear == iYearMin && iStartMonth <= iMonthMin ) ) { oHeader . setEnabledPrevious ( false ) ; } else { oHeader . setEnabledPrevious ( true ) ; } if ( iEndMonth > 10 || ( iYear == iYearMax && iEndMonth >= iMonthMax ) ) { oHeader . setEnabledNext ( false ) ; } else { oHeader . setEnabledNext ( true ) ; } return ; } if ( ( iYear < iYearMin || ( iYear == iYearMin && ( bSkipMonthCheck || ( iMonth < iMonthMin || ( iMonth == iMonthMin && ( iDate < iDateMin || ( iDate == iDateMin && ( iHours < iHoursMin || ( iHours == iHoursMin && iMinutes <= iMinutesMin ) ) ) ) ) ) ) ) ) || ( ( this . _iMode == 1 || this . _iMode == 2 ) && this . getPickerPopup ( ) ) ) { oHeader . setEnabledPrevious ( false ) ; } else { oHeader . setEnabledPrevious ( true ) ; } oDate . setUTCMinutes ( oDate . getUTCMinutes ( ) + ( iItems ) * this . getIntervalMinutes ( ) - 1 ) ; iYear = oDate . getJSDate ( ) . getUTCFullYear ( ) ; iMonth = oDate . getJSDate ( ) . getUTCMonth ( ) ; iDate = oDate . getJSDate ( ) . getUTCDate ( ) ; iHours = oDate . getJSDate ( ) . getUTCHours ( ) ; iMinutes = oDate . getJSDate ( ) . getUTCMinutes ( ) ; if ( ( iYear > iYearMax || ( iYear == iYearMax && ( ! bSkipMonthCheck || ( iMonth > iMonthMax || ( iMonth == iMonthMax && ( iDate > iDateMax || ( iDate == iDateMax && ( iHours > iHoursMax || ( iHours == iHoursMax && iMinutes >= iMinutesMax ) ) ) ) ) ) ) ) ) || ( ( this . _iMode == 1 || this . _iMode == 2 ) && this . getPickerPopup ( ) ) ) { oHeader . setEnabledNext ( false ) ; } else { oHeader . setEnabledNext ( true ) ; } if ( this . _iMode === 1 ) { var oLastDayOfMonth = new UniversalDate ( oDate . getTime ( ) ) ; oLastDayOfMonth . setUTCDate ( 1 ) ; oLastDayOfMonth . setUTCMonth ( oLastDayOfMonth . getUTCMonth ( ) + 1 ) ; oLastDayOfMonth . setUTCDate ( 0 ) ; var iDays = this . getAggregation ( "datesRow" ) . getDays ( ) ; oDate . setUTCDate ( 1 + ( Math . ceil ( oDate . getUTCDate ( ) / iDays ) - 1 ) * iDays ) ; if ( oLastDayOfMonth . getUTCDate ( ) - oDate . getUTCDate ( ) < iDays ) { oDate . setUTCDate ( oLastDayOfMonth . getUTCDate ( ) - iDays + 1 ) ; } iDate = oDate . getUTCDate ( ) ; if ( iDate <= 1 || ( iYear == iYearMin && iMonth == iMonthMin && iDate <= iDateMin ) ) { oHeader . setEnabledPrevious ( false ) ; } else { oHeader . setEnabledPrevious ( true ) ; } if ( ( iDate + iDays ) >= oLastDayOfMonth . getUTCDate ( ) || ( iYear == iYearMax && iMonth == iMonthMax && iDate >= iDateMax ) ) { oHeader . setEnabledNext ( false ) ; } else { oHeader . setEnabledNext ( true ) ; } } }
Enables / Disables previous and next button in the Header.
Enables / Disables previous and next button in the Header .
// in line month picker don't disable buttons