function _selectMonth(oDate, bMove){

		if (!this._checkMonthEnabled(oDate)) {
			// date is disabled -> do not select it
			return false;
		}

		var aSelectedDates = this.getSelectedDates();
		var oDateRange;
		var i = 0;
		var oParent = this.getParent();
		var oAggOwner = this;
		var oStartDate;

		if (oParent && oParent.getSelectedDates) {
			// if used in Calendar use the aggregation of this one
			oAggOwner = oParent;
		}

		/* eslint-disable no-lonely-if */
		if (this.getSingleSelection()) {

			if (aSelectedDates.length > 0) {
				oDateRange = aSelectedDates[0];
				oStartDate = oDateRange.getStartDate();
				if (oStartDate) {
					oStartDate = CalendarDate.fromLocalJSDate(oStartDate);
					oStartDate.setDate(1); // begin of month
				}
			} else {
				oDateRange = new DateRange();
				oAggOwner.addAggregation("selectedDates", oDateRange);
			}

			if (this.getIntervalSelection() && (!oDateRange.getEndDate() || bMove) && oStartDate) {
				// single interval selection
				var oEndDate;
				if (oDate.isBefore(oStartDate)) {
					oEndDate = oStartDate;
					oStartDate = oDate;
					if (!bMove) {
						// in move mode do not set date. this bring problems if on backward move the start date would be changed
						oDateRange.setProperty("startDate", oStartDate.toLocalJSDate());
						oDateRange.setProperty("endDate", oEndDate.toLocalJSDate());
					}
				} else if (oDate.isSameOrAfter(oStartDate)) {
					// single day ranges are allowed
					oEndDate = oDate;
					if (!bMove) {
						oDateRange.setProperty("endDate", oEndDate.toLocalJSDate());
					}
				}
			} else {
				oDateRange.setProperty("startDate", oDate.toLocalJSDate());
				oDateRange.setProperty("endDate", undefined);
			}
		} else {
			// multiple selection
			if (this.getIntervalSelection()) {
				throw new Error("Calender don't support multiple interval selection");

			} else {
				var iSelected = this._checkDateSelected(oDate);
				if (iSelected > 0) {
					// already selected - deselect
					for ( i = 0; i < aSelectedDates.length; i++) {
						oStartDate = aSelectedDates[i].getStartDate();
						if (oStartDate) {
							oStartDate = CalendarDate.fromLocalJSDate(oStartDate);
							oStartDate.setDate(1); // begin of month
							if (oDate.isSame(oStartDate)) {
								oAggOwner.removeAggregation("selectedDates", i);
								break;
							}
						}
					}
				} else {
					// not selected -> select
					oDateRange = new DateRange({startDate: oDate.toLocalJSDate()});
					oAggOwner.addAggregation("selectedDates", oDateRange);
				}
			}
		}

		return true;

	}
/**
	* @param {sap.ui.unified.calendar.CalendarDate} oDate The date to be set to the month and the year in the header
	* @param {boolean} bMove Whether move event is fired
	* @returns {boolean} Whether the month is selected
	* @private
	*/
@param {sap.ui.unified.calendar.CalendarDate} oDate The date to be set to the month and the year in the header
@param {boolean} bMove Whether move event is fired
@returns {boolean} Whether the month is selected
@private
@param { sap . ui . unified . calendar . CalendarDate } oDate The date to be set to the month and the year in the header @param { boolean } bMove Whether move event is fired @returns { boolean } Whether the month is selected @private
function _selectMonth(oDate, bMove){
		if (!this._checkMonthEnabled(oDate)) {
			return false;
		}
		var aSelectedDates = this.getSelectedDates();
		var oDateRange;
		var i = 0;
		var oParent = this.getParent();
		var oAggOwner = this;
		var oStartDate;
		if (oParent && oParent.getSelectedDates) {
			oAggOwner = oParent;
		}
		if (this.getSingleSelection()) {
			if (aSelectedDates.length > 0) {
				oDateRange = aSelectedDates[0];
				oStartDate = oDateRange.getStartDate();
				if (oStartDate) {
					oStartDate = CalendarDate.fromLocalJSDate(oStartDate);
					oStartDate.setDate(1); 
				}
			} else {
				oDateRange = new DateRange();
				oAggOwner.addAggregation("selectedDates", oDateRange);
			}
			if (this.getIntervalSelection() && (!oDateRange.getEndDate() || bMove) && oStartDate) {
				var oEndDate;
				if (oDate.isBefore(oStartDate)) {
					oEndDate = oStartDate;
					oStartDate = oDate;
					if (!bMove) {
						oDateRange.setProperty("startDate", oStartDate.toLocalJSDate());
						oDateRange.setProperty("endDate", oEndDate.toLocalJSDate());
					}
				} else if (oDate.isSameOrAfter(oStartDate)) {
					oEndDate = oDate;
					if (!bMove) {
						oDateRange.setProperty("endDate", oEndDate.toLocalJSDate());
					}
				}
			} else {
				oDateRange.setProperty("startDate", oDate.toLocalJSDate());
				oDateRange.setProperty("endDate", undefined);
			}
		} else {
			if (this.getIntervalSelection()) {
				throw new Error("Calender don't support multiple interval selection");
			} else {
				var iSelected = this._checkDateSelected(oDate);
				if (iSelected > 0) {
					for ( i = 0; i < aSelectedDates.length; i++) {
						oStartDate = aSelectedDates[i].getStartDate();
						if (oStartDate) {
							oStartDate = CalendarDate.fromLocalJSDate(oStartDate);
							oStartDate.setDate(1); 
							if (oDate.isSame(oStartDate)) {
								oAggOwner.removeAggregation("selectedDates", i);
								break;
							}
						}
					}
				} else {
					oDateRange = new DateRange({startDate: oDate.toLocalJSDate()});
					oAggOwner.addAggregation("selectedDates", oDateRange);
				}
			}
		}
		return true;
	}
function _selectMonth ( oDate , bMove ) { if ( ! this . _checkMonthEnabled ( oDate ) ) { return false ; } var aSelectedDates = this . getSelectedDates ( ) ; var oDateRange ; var i = 0 ; var oParent = this . getParent ( ) ; var oAggOwner = this ; var oStartDate ; if ( oParent && oParent . getSelectedDates ) { oAggOwner = oParent ; } if ( this . getSingleSelection ( ) ) { if ( aSelectedDates . length > 0 ) { oDateRange = aSelectedDates [ 0 ] ; oStartDate = oDateRange . getStartDate ( ) ; if ( oStartDate ) { oStartDate = CalendarDate . fromLocalJSDate ( oStartDate ) ; oStartDate . setDate ( 1 ) ; } } else { oDateRange = new DateRange ( ) ; oAggOwner . addAggregation ( "selectedDates" , oDateRange ) ; } if ( this . getIntervalSelection ( ) && ( ! oDateRange . getEndDate ( ) || bMove ) && oStartDate ) { var oEndDate ; if ( oDate . isBefore ( oStartDate ) ) { oEndDate = oStartDate ; oStartDate = oDate ; if ( ! bMove ) { oDateRange . setProperty ( "startDate" , oStartDate . toLocalJSDate ( ) ) ; oDateRange . setProperty ( "endDate" , oEndDate . toLocalJSDate ( ) ) ; } } else if ( oDate . isSameOrAfter ( oStartDate ) ) { oEndDate = oDate ; if ( ! bMove ) { oDateRange . setProperty ( "endDate" , oEndDate . toLocalJSDate ( ) ) ; } } } else { oDateRange . setProperty ( "startDate" , oDate . toLocalJSDate ( ) ) ; oDateRange . setProperty ( "endDate" , undefined ) ; } } else { if ( this . getIntervalSelection ( ) ) { throw new Error ( "Calender don't support multiple interval selection" ) ; } else { var iSelected = this . _checkDateSelected ( oDate ) ; if ( iSelected > 0 ) { for ( i = 0 ; i < aSelectedDates . length ; i ++ ) { oStartDate = aSelectedDates [ i ] . getStartDate ( ) ; if ( oStartDate ) { oStartDate = CalendarDate . fromLocalJSDate ( oStartDate ) ; oStartDate . setDate ( 1 ) ; if ( oDate . isSame ( oStartDate ) ) { oAggOwner . removeAggregation ( "selectedDates" , i ) ; break ; } } } } else { oDateRange = new DateRange ( { startDate : oDate . toLocalJSDate ( ) } ) ; oAggOwner . addAggregation ( "selectedDates" , oDateRange ) ; } } } return true ; }
@param {sap.ui.unified.calendar.CalendarDate} oDate The date to be set to the month and the year in the header
 @param {boolean} bMove Whether move event is fired
 @returns {boolean} Whether the month is selected
 @private
@param { sap . ui . unified . calendar . CalendarDate } oDate The date to be set to the month and the year in the header @param { boolean } bMove Whether move event is fired @returns { boolean } Whether the month is selected @private
// date is disabled -> do not select it // if used in Calendar use the aggregation of this one /* eslint-disable no-lonely-if */ // begin of month // single interval selection // in move mode do not set date. this bring problems if on backward move the start date would be changed // single day ranges are allowed // multiple selection // already selected - deselect // begin of month // not selected -> select