AdfRichUIPeer.createPeerClass(AdfRichUIPeer, "AdfDhtmlChooseDatePeer");
AdfDhtmlChooseDatePeer.prototype.handleUpdateFromInputComponent = function(chooseComponent, propertyName, newValue) {
  if(propertyName == AdfDhtmlChooseDatePeer.SELECTED_DATE) {
    if(newValue == null) {
      newValue = this._getTodayDate(chooseComponent, this.getDomElement())
    }
    this._queueGridRefresh(chooseComponent, newValue.getMonth(), newValue.getFullYear())
  }
};
AdfDhtmlChooseDatePeer.prototype.submitValueToInput = function(dayNode, chooseDateComp) {
  var datetime = this._getSelectedDateTime(dayNode);
  if(datetime != null) {
    AdfDhtmlInputChooseBindingUtils.updateInputComponentProperty(chooseDateComp, null, AdfUIValue.VALUE, datetime)
  }
  AdfDhtmlInputChooseBindingUtils.returnToInputComponent(chooseDateComp, true)
};
AdfDhtmlChooseDatePeer.InitSubclass = function() {
  AdfRichUIPeer.addComponentEventHandlers(this, AdfUIInputEvent.CLICK_EVENT_TYPE, AdfUIInputEvent.KEY_DOWN_EVENT_TYPE, AdfValueChangeEvent.VALUE_CHANGE_TYPE);
  this._CHOOSE_MONTH_ID = "mSel";
  this._YEAR_SPIN_ID = "ys";
  this._NEXT_MONTH_ID = "nm";
  this._PREV_MONTH_ID = "pm";
  this._CAL_GRID_ID = "cg";
  this._HOUR_SPIN_ID = "hs";
  this._MIN_SPIN_ID = "ms";
  this._SEC_SPIN_ID = "ss";
  this._AMPM_ID = "ap";
  this._TIMEZONE_ID = "tz";
  this._TIMEZONE_DISPID_ID = "tzDispId";
  this._CONTENT_ID = "content";
  this._INCREMENT_ID = "increment";
  this._DECREMENT_ID = "decrement";
  this._CURRDAY_ID_ATTR_NAME = "data-afr-adfCDay";
  this._CURRMONTH_ID_ATTR_NAME = "data-afr-adfCMonth";
  this._CURRYEAR_ID_ATTR_NAME = "data-afr-adfCYear";
  this._DAY_ID_ATTR_NAME = "data-afr-adfDay";
  this._SELECTED_DATE = "data-afr-adfseld";
  this._SHOW_DATE = "data-afr-adfshwd";
  this._TODAY_DATE = "data-afr-adftdy";
  this._RANGE_START = "data-afr-adfrs";
  this._RANGE_END = "data-afr-adfre";
  this._ALLOW_TIME_SELECTION = "data-afr-adfts";
  this._FIRST_DAY_OF_WEEK = "data-afr-adffdow";
  this._NUMBER_HOUR_DIGITS = "data-afr-adfhh";
  this._NUMBER_MINUTE_DIGITS = "data-afr-adfmm";
  this._NUMBER_SECOND_DIGITS = "data-afr-adfss";
  this._SHOW_TIMEZONE = "data-afr-adftz";
  this._SHOW_24_HOUR_FORMAT = "data-afr-adf24";
  this._COUNT_ZERO_BASED = "data-afr-adfcnt0";
  this._SHOW_AM_PM = "data-afr-adfampm";
  this._SHOW_AM_PM_IN_2_ROWS = "data-afr-adfampm2";
  this._CLIENT_TIME_ZONE = "data-afr-adfctz";
  this._PARENT_ID = "data-afr-par";
  this._LOCALE = "data-afr-loc";
  this._IS_FETCH = "data-afr-fetch";
  this._LEAD_ZERO = "_adfLeadingZero";
  this.THAI_BUDDHIST = "th_TH";
  this._THAI_BUDDHIST_YEAR_OFFSET = 543;
  this.SELECTED_DATE = "selectedDate";
  this.TIMEZONE_SEL_DISPLAY = "tzSelDisp";
  this.TIMEZONE_SEL_ID = "tzSelId";
  this._SEL_DAY_CLASS = "p_AFSelected";
  this._DISABLED_STYLE_CLASS = "p_AFDisabled";
  this._MAX_CLIENT_RANGE_YEARS = 6;
  this._DISABLED_DAYS_OF_WEEK_KEYS = {"sun":0, "mon":1, "tue":2, "wed":3, "thu":4, "fri":5, "sat":6};
  this._DISABLED_MONTHS_KEYS = {"jan":0, "feb":1, "mar":2, "apr":3, "may":4, "jun":5, "jul":6, "aug":7, "sep":8, "oct":9, "nov":10, "dec":11}
};
AdfDhtmlChooseDatePeer.prototype.InitDomElement = function(component, domElement) {
  AdfDhtmlChooseDatePeer.superclass.InitDomElement.call(this, component, domElement);
  if(component.getDisabledDays() != null && this._getClientRangeStartDate(component, domElement) == null && this._getClientRangeEndDate(component, domElement) == null) {
    this._createOrUpdateClientStartAndEndRange(component, domElement, this._getShowDate(component, domElement))
  }
  this.BindToComponent(component, this._renderChooseDateDom(component, domElement))
};
AdfDhtmlChooseDatePeer.prototype.HandleComponentClick = function(componentEvent) {
  var eventTarget = componentEvent.getNativeEventTarget();
  var component = componentEvent.getSource();
  if(componentEvent.isLeftButtonPressed()) {
    if(this._isInCalendarGrid(eventTarget)) {
      var parentId = this._getParentID(component, this.getDomElement());
      var exclude = parentId && this._isInDialog();
      this._selectDateInGrid(eventTarget, component, !exclude)
    }else {
      var prevSubid = AdfRichUIPeer.CreateSubId(component.getClientId(), AdfDhtmlChooseDatePeer._PREV_MONTH_ID);
      if(AdfDomUtils.isAncestorOrSelf(AdfAgent.AGENT.getElementById(prevSubid), eventTarget)) {
        this._manipulateMonthValue(component, false);
        return
      }
      var nextSubid = AdfRichUIPeer.CreateSubId(component.getClientId(), AdfDhtmlChooseDatePeer._NEXT_MONTH_ID);
      if(AdfDomUtils.isAncestorOrSelf(AdfAgent.AGENT.getElementById(nextSubid), eventTarget)) {
        this._manipulateMonthValue(component, true);
        return
      }
    }
  }
};
AdfDhtmlChooseDatePeer.prototype.HandleComponentKeyDown = function(componentEvent) {
  var evt = componentEvent.getNativeEvent();
  var keyCode = AdfAgent.AGENT.getKeyCode(evt);
  var component = componentEvent.getSource();
  var cancelEvt;
  if(evt.ctrlKey) {
    return
  }
  var eventTarget = componentEvent.getNativeEventTarget();
  switch(keyCode) {
    case AdfKeyStroke.ARROWUP_KEY:
    ;
    case AdfKeyStroke.ARROWDOWN_KEY:
    ;
    case AdfKeyStroke.ARROWRIGHT_KEY:
    ;
    case AdfKeyStroke.ARROWLEFT_KEY:
      if(this._isInCalendarGrid(eventTarget)) {
        cancelEvt = this._handleArrowKeys(keyCode, eventTarget)
      }
      break;
    case AdfKeyStroke.SPACE_KEY:
      if(this._isInCalendarGrid(eventTarget)) {
        var closeDialog = true;
        var hourSubId = AdfRichUIPeer.CreateSubId(component.getClientId(), AdfDhtmlChooseDatePeer._HOUR_SPIN_ID);
        var hourComp = AdfPage.PAGE.findComponent(hourSubId);
        if(hourComp) {
          closeDialog = false
        }
        this._selectDateInGrid(eventTarget, component, closeDialog);
        cancelEvt = true
      }else {
        var prevSubid = AdfRichUIPeer.CreateSubId(component.getClientId(), AdfDhtmlChooseDatePeer._PREV_MONTH_ID);
        if(AdfDomUtils.isAncestorOrSelf(AdfAgent.AGENT.getElementById(prevSubid), eventTarget)) {
          this._manipulateMonthValue(component, false);
          return
        }
        var nextSubid = AdfRichUIPeer.CreateSubId(component.getClientId(), AdfDhtmlChooseDatePeer._NEXT_MONTH_ID);
        if(AdfDomUtils.isAncestorOrSelf(AdfAgent.AGENT.getElementById(nextSubid), eventTarget)) {
          this._manipulateMonthValue(component, true);
          return
        }
      }
      break;
    case AdfKeyStroke.ENTER_KEY:
      if(this._isInCalendarGrid(eventTarget)) {
        this._selectDateInGrid(eventTarget, component, true);
        cancelEvt = true
      }
      break
  }
  if(cancelEvt) {
    componentEvent.cancel();
    return false
  }
};
AdfDhtmlChooseDatePeer.prototype.HandleComponentValueChange = function(componentEvent) {
  var sourceId = componentEvent.getSource().getClientId();
  var component = this.getComponent();
  var chooseMonthSubid = AdfRichUIPeer.CreateSubId(component.getClientId(), AdfDhtmlChooseDatePeer._CHOOSE_MONTH_ID);
  if(sourceId == chooseMonthSubid) {
    this._handleMonthChange(componentEvent)
  }else {
    var chooseYearSubid = AdfRichUIPeer.CreateSubId(component.getClientId(), AdfDhtmlChooseDatePeer._YEAR_SPIN_ID);
    if(sourceId == chooseYearSubid) {
      this._handleYearChange(componentEvent)
    }
  }
};
AdfDhtmlChooseDatePeer.prototype.hardRefreshDOM = function() {
  var component = this.getComponent();
  var placeHolderElement = this.getDomElement();
  domNode = AdfAgent.AGENT.getElementById(component.getClientId());
  this.BindToComponent(component, this._renderChooseDateDom(component, placeHolderElement))
};
AdfDhtmlChooseDatePeer.prototype._getGridElement = function() {
  var component = this.getComponent();
  var gridid = AdfRichUIPeer.CreateSubId(component.getClientId(), AdfDhtmlChooseDatePeer._CAL_GRID_ID);
  return AdfAgent.AGENT.getElementById(gridid)
};
AdfDhtmlChooseDatePeer.prototype._getCurrentSelection = function(clearStyle) {
  var rootDomElement = this.getDomElement();
  if(rootDomElement.getAttribute(AdfDhtmlChooseDatePeer._CURRDAY_ID_ATTR_NAME)) {
    var grid = this._getGridElement();
    var rows = grid.childNodes[0].childNodes;
    for(i = 0;i < rows.length;i++) {
      if(AdfAgent.AGENT.getNodeName(rows[i]) == "TR") {
        var tr = rows[i];
        for(j = 0;j < tr.childNodes.length;j++) {
          var child = tr.childNodes[j];
          if(AdfAgent.AGENT.getNodeName(child) == "TD" && AdfDomUtils.containsCSSClassName(child, AdfDhtmlChooseDatePeer._SEL_DAY_CLASS)) {
            if(clearStyle) {
              AdfDomUtils.removeCSSClassName(child, AdfDhtmlChooseDatePeer._SEL_DAY_CLASS)
            }
            return child
          }
        }
      }
    }
  }
  return null
};
AdfDhtmlChooseDatePeer.prototype._handleArrowKeys = function(keyCode, tdcell) {
  var targetElement = null;
  var pos;
  switch(keyCode) {
    case AdfKeyStroke.ARROWUP_KEY:
    ;
    case AdfKeyStroke.ARROWDOWN_KEY:
      if(keyCode == AdfKeyStroke.ARROWUP_KEY) {
        targetElement = AdfDomUtils.getPreviousElement(tdcell.parentNode)
      }else {
        targetElement = AdfDomUtils.getNextElement(tdcell.parentNode)
      }
      if(targetElement) {
        pos = AdfDomUtils.getElementPosition(tdcell);
        targetElement = AdfDomUtils.getChildElementByPosition(targetElement, tdcell.nodeType, pos)
      }
      break;
    case AdfKeyStroke.ARROWRIGHT_KEY:
      targetElement = AdfDomUtils.getNextElement(tdcell);
      if(!targetElement && tdcell.parentNode != null) {
        var nextRow = AdfDomUtils.getNextElement(tdcell.parentNode);
        if(nextRow) {
          targetElement = AdfDomUtils.getFirstChildElement(nextRow)
        }
      }
      break;
    case AdfKeyStroke.ARROWLEFT_KEY:
      targetElement = AdfDomUtils.getPreviousElement(tdcell);
      if(!targetElement && tdcell.parentNode != null) {
        var prevRow = AdfDomUtils.getPreviousElement(tdcell.parentNode);
        if(prevRow) {
          targetElement = AdfDomUtils.getLastChildElement(prevRow)
        }
      }
      break;
    default:
      break
  }
  if(targetElement && this._isInCalendarGrid(targetElement)) {
    if(tdcell) {
      tdcell.setAttribute("tabIndex", "-1")
    }
    targetElement.setAttribute("tabIndex", "0");
    AdfFocusUtils.focusElement(targetElement);
    return true
  }
  return false
};
AdfDhtmlChooseDatePeer.prototype._handleMonthChange = function(componentEvent) {
  var monthChoose = componentEvent.getSource();
  if(monthChoose._ignoreVCE) {
    delete monthChoose._ignoreVCE;
    return
  }
  var monthChooseId = monthChoose.getClientId();
  var chooseDateId = monthChooseId.substring(0, monthChooseId.lastIndexOf("::"));
  var chooseDate = AdfPage.PAGE.findComponent(chooseDateId);
  var chooseDatePeer = chooseDate.getPeer();
  chooseDatePeer.bind(chooseDate);
  var curDisplayDate = this._getShowDate(chooseDate, this.getDomElement());
  chooseDatePeer._queueGridRefresh(chooseDate, parseInt(monthChoose.getValue()), curDisplayDate.getFullYear())
};
AdfDhtmlChooseDatePeer.prototype._handleYearChange = function(componentEvent) {
  var yrSpin = componentEvent.getSource();
  if(yrSpin._ignoreVCE) {
    delete yrSpin._ignoreVCE;
    return
  }
  var displayYear = yrSpin.getValue();
  var yrSpinId = yrSpin.getClientId();
  var chooseDateId = yrSpinId.substring(0, yrSpinId.lastIndexOf("::"));
  var chooseDate = AdfPage.PAGE.findComponent(chooseDateId);
  var chooseDatePeer = chooseDate.getPeer();
  chooseDatePeer.bind(chooseDate);
  var domElement = this.getDomElement();
  var curDisplayDate = this._getShowDate(chooseDate, domElement);
  var year = displayYear;
  if(this._isThaiBuddistCalendar(chooseDate, domElement)) {
    year -= AdfDhtmlChooseDatePeer._THAI_BUDDHIST_YEAR_OFFSET
  }
  chooseDatePeer._queueGridRefresh(chooseDate, curDisplayDate.getMonth(), year)
};
AdfDhtmlChooseDatePeer.prototype._isInDialog = function() {
  return this.getComponent().getParent() instanceof AdfRichDialog
};
AdfDhtmlChooseDatePeer.prototype._isInCalendarGrid = function(node) {
  if(node) {
    if(AdfAgent.AGENT.getNodeName(node) == "TD") {
      var day = parseInt(AdfAgent.AGENT.getTextContent(node));
      if(!isNaN(day)) {
        return true
      }
    }
  }
  return false
};
AdfDhtmlChooseDatePeer.prototype._getSelectedDateTime = function(dayNode) {
  var component = this.getComponent();
  var day, month, year;
  var hour, min, sec;
  var rootDomElement = this.getDomElement();
  if(rootDomElement.getAttribute(AdfDhtmlChooseDatePeer._CURRMONTH_ID_ATTR_NAME)) {
    month = parseInt(rootDomElement.getAttribute(AdfDhtmlChooseDatePeer._CURRMONTH_ID_ATTR_NAME));
    year = parseInt(rootDomElement.getAttribute(AdfDhtmlChooseDatePeer._CURRYEAR_ID_ATTR_NAME));
    var dayattr;
    if(dayNode) {
      day = parseInt(AdfAgent.AGENT.getTextContent(dayNode));
      dayattr = dayNode.getAttribute(AdfDhtmlChooseDatePeer._DAY_ID_ATTR_NAME)
    }else {
      var selNode = this._getCurrentSelection(false);
      if(selNode) {
        day = parseInt(AdfAgent.AGENT.getTextContent(selNode));
        dayattr = selNode.getAttribute(AdfDhtmlChooseDatePeer._DAY_ID_ATTR_NAME)
      }
    }
  }
  var hourSubId = AdfRichUIPeer.CreateSubId(component.getClientId(), AdfDhtmlChooseDatePeer._HOUR_SPIN_ID);
  var hourComp = AdfPage.PAGE.findComponent(hourSubId);
  if(hourComp) {
    hour = hourComp.getValue();
    var minComp = AdfPage.PAGE.findComponent(AdfRichUIPeer.CreateSubId(component.getClientId(), AdfDhtmlChooseDatePeer._MIN_SPIN_ID));
    min = minComp.getValue();
    var secComp = AdfPage.PAGE.findComponent(AdfRichUIPeer.CreateSubId(component.getClientId(), AdfDhtmlChooseDatePeer._SEC_SPIN_ID));
    sec = secComp.getValue();
    var ampmComp = AdfPage.PAGE.findComponent(AdfRichUIPeer.CreateSubId(component.getClientId(), AdfDhtmlChooseDatePeer._AMPM_ID));
    if(ampmComp) {
      var ampm = ampmComp.getValue();
      if(hour == 12) {
        if(ampm == "0") {
          hour = 0
        }
      }else {
        if(ampm == "1") {
          hour = +hour + 12
        }
      }
    }
  }
  var date;
  if(year != undefined && month != undefined && day != undefined) {
    if(hour != undefined && min != undefined && sec != undefined) {
      date = new Date(year, month, day, hour, min, sec)
    }else {
      date = new Date(year, month, day)
    }
    date.setFullYear(year)
  }else {
    date = null
  }
  var tzsubId = AdfRichUIPeer.CreateSubId(component.getClientId(), AdfDhtmlChooseDatePeer._TIMEZONE_ID);
  var tzComp = AdfPage.PAGE.findComponent(tzsubId);
  if(tzComp) {
    var tzPeer = tzComp.getPeer();
    tzPeer.bind(tzComp);
    var tzNode = tzPeer.getDomElement();
    var tzContent = AdfDhtmlEditableValuePeer.getContentNode(tzComp, tzNode);
    var tzId = tzContent.value;
    var tzDisp = AdfAgent.AGENT.getTextContent(tzContent.options[tzContent.selectedIndex]);
    AdfDhtmlInputChooseBindingUtils.updateInputComponentProperty(component, null, AdfDhtmlChooseDatePeer.TIMEZONE_SEL_DISPLAY, tzDisp);
    AdfDhtmlInputChooseBindingUtils.updateInputComponentProperty(component, null, AdfDhtmlChooseDatePeer.TIMEZONE_SEL_ID, tzId)
  }
  return date
};
AdfDhtmlChooseDatePeer.prototype._manipulateMonthValue = function(component, increment) {
  var domElement = this.getDomElement();
  var curDisplayDate = this._getShowDate(component, domElement);
  var month = curDisplayDate.getMonth();
  var year = curDisplayDate.getFullYear();
  if(increment) {
    month++
  }else {
    month--
  }
  var chooseMonthSubid = AdfRichUIPeer.CreateSubId(component.getClientId(), AdfDhtmlChooseDatePeer._CHOOSE_MONTH_ID);
  var chooseMonth = AdfPage.PAGE.findComponent(chooseMonthSubid);
  var yearChange = 0;
  if(month < 0) {
    month += 12;
    yearChange = -1
  }else {
    if(month > 11) {
      month -= 12;
      yearChange = 1
    }
  }
  if(yearChange) {
    year = year + yearChange;
    var chooseYearSubid = AdfRichUIPeer.CreateSubId(component.getClientId(), AdfDhtmlChooseDatePeer._YEAR_SPIN_ID);
    var yrSpin = AdfPage.PAGE.findComponent(chooseYearSubid);
    var max = yrSpin.getMaximum();
    var min = yrSpin.getMinimum();
    if(min && year < min) {
      return
    }
    if(max && year > max) {
      return
    }
    yrSpin._ignoreVCE = true;
    var displayYear = year;
    if(this._isThaiBuddistCalendar(component, domElement)) {
      displayYear += AdfDhtmlChooseDatePeer._THAI_BUDDHIST_YEAR_OFFSET
    }
    yrSpin.setProperty("value", "" + displayYear)
  }
  chooseMonth._ignoreVCE = true;
  chooseMonth.setProperty("value", "" + (month + 12) % 12);
  this._queueGridRefresh(component, month, year);
  return
};
AdfDhtmlChooseDatePeer.prototype._queueGridRefresh = function(component, month, year) {
  var agent = AdfAgent.AGENT;
  var rootDomElement = this.getDomElement();
  var requiresServerTrip = false;
  var showDate = new Date(this._getShowDate(component, this.getDomElement()).getTime());
  showDate.setDate(1);
  showDate.setMonth(month);
  showDate.setYear(year);
  this._setShowDate(component, rootDomElement, showDate);
  var startOfClientRange = this._getClientRangeStartDate(component, rootDomElement);
  var endOfClientRange = this._getClientRangeEndDate(component, rootDomElement);
  if(startOfClientRange != null && endOfClientRange != null) {
    if(showDate < startOfClientRange || showDate > endOfClientRange) {
      requiresServerTrip = true
    }
  }
  if(requiresServerTrip) {
    this._queueAdfContentFetchEvent(component, showDate)
  }else {
    var tableElem = agent.getElementById(AdfRichUIPeer.CreateSubId(component.getClientId(), AdfDhtmlChooseDatePeer._CAL_GRID_ID));
    agent.elementsRemoved(tableElem);
    day = agent.getAttribute(rootDomElement, AdfDhtmlChooseDatePeer._CURRDAY_ID_ATTR_NAME);
    month = agent.getAttribute(rootDomElement, AdfDhtmlChooseDatePeer._CURRMONTH_ID_ATTR_NAME);
    year = agent.getAttribute(rootDomElement, AdfDhtmlChooseDatePeer._CURRYEAR_ID_ATTR_NAME);
    var hourSubId = AdfRichUIPeer.CreateSubId(component.getClientId(), AdfDhtmlChooseDatePeer._HOUR_SPIN_ID);
    var hourComp = AdfPage.PAGE.findComponent(hourSubId);
    var hour = 0, min = 0, sec = 0;
    if(hourComp) {
      hour = hourComp.getValue();
      var minComp = AdfPage.PAGE.findComponent(AdfRichUIPeer.CreateSubId(component.getClientId(), AdfDhtmlChooseDatePeer._MIN_SPIN_ID));
      min = minComp.getValue();
      var secComp = AdfPage.PAGE.findComponent(AdfRichUIPeer.CreateSubId(component.getClientId(), AdfDhtmlChooseDatePeer._SEC_SPIN_ID));
      sec = secComp.getValue();
      var ampmComp = AdfPage.PAGE.findComponent(AdfRichUIPeer.CreateSubId(component.getClientId(), AdfDhtmlChooseDatePeer._AMPM_ID));
      if(ampmComp) {
        var ampm = ampmComp.getValue();
        if(hour == 12) {
          if(ampm == "0") {
            hour = 0
          }
        }else {
          if(ampm == "1") {
            hour = +hour + 12
          }
        }
      }
    }
    var newDateMatrixDOM = this._buildCalendarDateMatrix(component, rootDomElement, new Date(year, month, day, hour, min, sec));
    tableElem.parentNode.replaceChild(newDateMatrixDOM, tableElem);
    agent.elementsAdded(newDateMatrixDOM)
  }
};
AdfDhtmlChooseDatePeer.prototype._queueAdfContentFetchEvent = function(component, showDate) {
  var params = new Object;
  params["month"] = showDate.getMonth();
  params["year"] = showDate.getFullYear();
  var rootDOMElement = this.getDomElement();
  AdfAgent.AGENT.setAttribute(rootDOMElement, AdfDhtmlChooseDatePeer._IS_FETCH, "true");
  this._createOrUpdateClientStartAndEndRange(component, rootDOMElement, showDate);
  var contentFetchEvt = new AdfContentFetchEvent(component, AdfContentFetchEvent.FETCH_EVENT_TYPE, params);
  contentFetchEvt.preventUserInput();
  contentFetchEvt.queue()
};
AdfDhtmlChooseDatePeer.prototype._createOrUpdateClientStartAndEndRange = function(component, rootDOMElement, newShowDate) {
  newShowDate.setYear(newShowDate.getFullYear() - AdfDhtmlChooseDatePeer._MAX_CLIENT_RANGE_YEARS / 2);
  newShowDate.setDate(1);
  this._setClientRangeStartDate(component, rootDOMElement, newShowDate);
  newShowDate.setYear(newShowDate.getFullYear() + AdfDhtmlChooseDatePeer._MAX_CLIENT_RANGE_YEARS);
  this._setClientRangeEndDate(component, rootDOMElement, newShowDate)
};
AdfDhtmlChooseDatePeer.prototype._selectDateInGrid = function(tdcell, component, updateInput) {
  AdfAssert.assert(tdcell != null);
  var clientId = component.getClientId();
  var rootDOMElement = this.getDomElement();
  if(AdfDomUtils.containsCSSClassName(tdcell, AdfDhtmlChooseDatePeer._DISABLED_STYLE_CLASS)) {
    return
  }
  this._getCurrentSelection(true);
  AdfDomUtils.addCSSClassName(tdcell, AdfDhtmlChooseDatePeer._SEL_DAY_CLASS);
  var day = parseInt(AdfAgent.AGENT.getTextContent(tdcell));
  var monthSelComp = AdfPage.PAGE.findComponent(AdfRichUIPeer.CreateSubId(clientId, AdfDhtmlChooseDatePeer._CHOOSE_MONTH_ID));
  var month = monthSelComp.getValue();
  var yerSpinComp = AdfPage.PAGE.findComponent(AdfRichUIPeer.CreateSubId(clientId, AdfDhtmlChooseDatePeer._YEAR_SPIN_ID));
  var displayYear = yerSpinComp.getValue();
  var year = this._isThaiBuddistCalendar(component, rootDOMElement) ? displayYear - AdfDhtmlChooseDatePeer._THAI_BUDDHIST_YEAR_OFFSET : displayYear;
  var dayattr = tdcell.getAttribute(AdfDhtmlChooseDatePeer._DAY_ID_ATTR_NAME);
  if(dayattr) {
    if(dayattr == AdfDhtmlChooseDatePeer._PREV_MONTH_ID) {
      month--;
      if(month == -1) {
        month = 11;
        year--
      }
    }else {
      if(dayattr == AdfDhtmlChooseDatePeer._NEXT_MONTH_ID) {
        month++;
        if(month == 12) {
          month = 0;
          year++
        }
      }
    }
  }
  rootDOMElement.setAttribute(AdfDhtmlChooseDatePeer._CURRDAY_ID_ATTR_NAME, day);
  rootDOMElement.setAttribute(AdfDhtmlChooseDatePeer._CURRMONTH_ID_ATTR_NAME, month);
  rootDOMElement.setAttribute(AdfDhtmlChooseDatePeer._CURRYEAR_ID_ATTR_NAME, year);
  if(updateInput == true) {
    this.submitValueToInput(tdcell, component)
  }
};
AdfDhtmlChooseDatePeer.prototype._renderChooseDateDom = function(component, rootDOMElement) {
  var agent = AdfAgent.AGENT;
  var laf = AdfPage.PAGE.getLookAndFeel();
  var clientId = component.getClientId();
  var rootNode = AdfAgent.AGENT.getElementById(clientId);
  this._childComponents = new Array;
  var attrValue = agent.getAttribute(rootDOMElement, AdfDhtmlChooseDatePeer._SELECTED_DATE);
  var dateToBeSelected = attrValue != null ? AdfDhtmlChooseDatePeer._getISOStandardConverter().getAsObject(attrValue) : this._getTodayDate(component, rootDOMElement);
  var showDate = this._getShowDate(component, rootDOMElement);
  var isFetchResponse = agent.getAttribute(rootDOMElement, AdfDhtmlChooseDatePeer._IS_FETCH);
  if(isFetchResponse != null) {
    rootDOMElement.removeAttribute(AdfDhtmlChooseDatePeer._IS_FETCH);
    var oldCalendarMatrixRoot = agent.getElementById(AdfRichUIPeer.CreateSubId(clientId, AdfDhtmlChooseDatePeer._CAL_GRID_ID));
    var newCalendarMatrixRoot = this._buildCalendarDateMatrix(component, rootDOMElement, dateToBeSelected);
    oldCalendarMatrixRoot.parentNode.replaceChild(newCalendarMatrixRoot, oldCalendarMatrixRoot);
    agent.elementsAdded(newCalendarMatrixRoot);
    return rootDOMElement
  }
  var startOfClientRange = this._getClientRangeStartDate(component, rootDOMElement);
  var endOfClientRange = this._getClientRangeEndDate(component, rootDOMElement);
  var hasDisabledDays = component.getDisabledDays();
  var shouldRemoveSelectedDateAttribute = true;
  if(hasDisabledDays != null && showDate != null) {
    if(startOfClientRange != null && endOfClientRange != null && (showDate < startOfClientRange || showDate > endOfClientRange) || startOfClientRange == null && endOfClientRange == null) {
      this._queueAdfContentFetchEvent(component, showDate);
      shouldRemoveSelectedDateAttribute = false
    }
  }
  if(shouldRemoveSelectedDateAttribute) {
    rootDOMElement.removeAttribute(AdfDhtmlChooseDatePeer._SELECTED_DATE)
  }
  var chooseDateRootTable = this._createElementWithAttributes("table", {"role":"group", "cellpadding":"0", "cellspacing":"0", "border":"0", "summary":"", "class":laf.getStyleClass("af|chooseDate"), "id":clientId, "data-afr-adfCDay":dateToBeSelected.getDate(), "data-afr-adfCMonth":dateToBeSelected.getMonth(), "data-afr-adfCYear":dateToBeSelected.getFullYear()});
  var attrs = rootDOMElement.attributes;
  for(var i = 0;i < attrs.length;i++) {
    var attrValue = agent.getAttribute(chooseDateRootTable, attrs[i].name);
    if(attrValue == null) {
      agent.setAttribute(chooseDateRootTable, attrs[i].name, agent.getAttribute(rootDOMElement, attrs[i].name))
    }
  }
  var chooseDateRootTableBody = this._createAndAppendElement("tbody", {}, chooseDateRootTable);
  chooseDateRootTableBody.appendChild(this._buildHeaderDOM(component, rootDOMElement));
  chooseDateRootTableBody.appendChild(this._buildWallCalendarDOM(component, rootDOMElement, dateToBeSelected));
  if(this._allowTimeSelection(component, rootDOMElement)) {
    chooseDateRootTableBody.appendChild(this._buildTimeSelectionDOM(component, rootDOMElement, dateToBeSelected));
    if(this._allowTimeZoneSelection(component, rootDOMElement)) {
      chooseDateRootTableBody.appendChild(this._buildTimeZoneSelectionDOM(component, rootDOMElement))
    }
  }
  var subIdArray = [AdfRichUIPeer.CreateSubId(component.getClientId(), AdfDhtmlChooseDatePeer._HOUR_SPIN_ID), AdfRichUIPeer.CreateSubId(component.getClientId(), AdfDhtmlChooseDatePeer._MIN_SPIN_ID), AdfRichUIPeer.CreateSubId(component.getClientId(), AdfDhtmlChooseDatePeer._SEC_SPIN_ID)];
  for(i in subIdArray) {
    var timeEl = agent.getElementById(subIdArray[i]);
    if(!timeEl) {
      continue
    }
    timeEl.setAttribute(AdfDhtmlChooseDatePeer._LEAD_ZERO, true);
    var contentId = AdfRichUIPeer.CreateSubId(subIdArray[i], AdfDhtmlChooseDatePeer._CONTENT_ID);
    var contentNode = AdfAgent.AGENT.getElementById(contentId);
    var newValue = contentNode.value;
    AdfAssert.assertString(newValue);
    var tmp = parseFloat(newValue);
    if(isNaN(tmp) || tmp > 9) {
      continue
    }
    newValue = "0" + tmp;
    var isInput = contentNode.tagName == "INPUT";
    if(isInput) {
      contentNode.value = newValue;
      contentNode.title = newValue
    }else {
      AdfAgent.AGENT.setTextContent(contentNode, newValue)
    }
  }
  agent.elementsRemoved(rootNode);
  rootNode.parentNode.replaceChild(chooseDateRootTable, rootNode);
  agent.elementsAdded(chooseDateRootTable);
  AdfPage.PAGE.addComponents.apply(AdfPage.PAGE, this._childComponents);
  delete this._childComponents;
  return chooseDateRootTable
};
AdfDhtmlChooseDatePeer.prototype._buildHeaderDOM = function(component, rootDOMElement) {
  var laf = AdfPage.PAGE.getLookAndFeel();
  var cliendId = component.getClientId();
  var monthNames = this._getLocaleSymbols(component, rootDOMElement).getMonths().slice(0, 12);
  var headerRow = this._createElementWithAttributes("tr", {});
  var headerTableColumn = this._createAndAppendElement("td", {"class":laf.getStyleClass("af|chooseDate::month-year-row"), "align":"center", "colspan":7}, headerRow);
  var headerTable = this._createAndAppendElement("table", {"cellpadding":"0", "cellspacing":"0", "border":"0", "summary":"", "role":"presentation"}, headerTableColumn);
  var headerTableBody = this._createAndAppendElement("tbody", {}, headerTable);
  var headerTableRow = this._createAndAppendElement("tr", {}, headerTableBody);
  var previousMonthAnchorColumn = this._createAndAppendElement("td", {"class":laf.getStyleClass("af|chooseDate::prev-month-arrow-cell")}, headerTableRow);
  var prevMonthText = laf.getTranslatedString("af_chooseDate.TIP_PREVIOUS_MONTH");
  var previousMonthAnchor = this._createAndAppendElement("a", {"role":"button", "aria-label":prevMonthText, "href":"#", "onclick":"this.focus(); return false", "class":laf.getStyleClass("af|chooseDate::prev-month-arrow"), "id":AdfRichUIPeer.CreateSubId(cliendId, AdfDhtmlChooseDatePeer._PREV_MONTH_ID), "title":prevMonthText}, previousMonthAnchorColumn);
  var monthSelectChoiceColumn = this._createAndAppendElement("td", {}, headerTableRow);
  var monthSelectItems = [];
  for(var i = 0;i < monthNames.length;i++) {
    var selectItem = {};
    selectItem[i] = monthNames[i];
    monthSelectItems.push(selectItem)
  }
  var showDate = this._getShowDate(component, rootDOMElement);
  var selectMonthSpan = this._buildSelectOneChoiceElement(AdfRichUIPeer.CreateSubId(cliendId, AdfDhtmlChooseDatePeer._CHOOSE_MONTH_ID), laf.getStyleClass("af|chooseDate::choice-list-content"), laf.getTranslatedString("af_chooseDate.LABEL_SELECT_MONTH"), monthSelectItems, showDate.getMonth());
  monthSelectChoiceColumn.appendChild(selectMonthSpan);
  var yearSpinboxColumn = this._createAndAppendElement("td", {"class":laf.getStyleClass("af|chooseDate::year-selector-cell")}, headerTableRow);
  var selectedYear = showDate.getFullYear() + (this._isThaiBuddistCalendar(component, rootDOMElement) ? AdfDhtmlChooseDatePeer._THAI_BUDDHIST_YEAR_OFFSET : 0);
  var selectYearSpinbox = this._buildNumberSpinboxElement(AdfRichUIPeer.CreateSubId(cliendId, AdfDhtmlChooseDatePeer._YEAR_SPIN_ID), selectedYear, 1, 9999, 4, laf.getTranslatedString("af_chooseDate.LABEL_SELECT_YEAR"));
  yearSpinboxColumn.appendChild(selectYearSpinbox);
  var nextMonthAnchorColumn = this._createAndAppendElement("td", {"class":laf.getStyleClass("af|chooseDate::next-month-arrow-cell")}, headerTableRow);
  var nextMonthText = laf.getTranslatedString("af_chooseDate.TIP_NEXT_MONTH");
  var nextMonthAnchor = this._createAndAppendElement("a", {"role":"button", "aria-label":nextMonthText, "href":"#", "onclick":"this.focus();return false", "class":laf.getStyleClass("af|chooseDate::next-month-arrow"), "id":AdfRichUIPeer.CreateSubId(cliendId, AdfDhtmlChooseDatePeer._NEXT_MONTH_ID), "title":nextMonthText}, nextMonthAnchorColumn);
  return headerRow
};
AdfDhtmlChooseDatePeer.prototype._buildWallCalendarDOM = function(component, rootDOMElement, dateToBeSelected) {
  var calendarDomRow = this._createElementWithAttributes("tr", {});
  var calendarDomColumn = this._createAndAppendElement("td", {}, calendarDomRow);
  calendarDomColumn.appendChild(this._buildCalendarDateMatrix(component, rootDOMElement, dateToBeSelected));
  return calendarDomRow
};
AdfDhtmlChooseDatePeer.prototype._buildCalendarDateMatrix = function(component, rootDOMElement, dateToBeSelected) {
  var laf = AdfPage.PAGE.getLookAndFeel();
  var clientId = component.getClientId();
  var showDate = this._getShowDate(component, rootDOMElement);
  var showMonth = showDate.getMonth();
  var showYear = showDate.getFullYear();
  var monthNames = this._getLocaleSymbols(component, rootDOMElement).getMonths();
  var calendarDomTable = this._createElementWithAttributes("table", {"role":"grid", "cellpadding":"0", "cellspacing":"0", "border":"0", "width":"100%", "aria-label":monthNames[showMonth] + " " + (showYear + (this._isThaiBuddistCalendar(component, rootDOMElement) ? AdfDhtmlChooseDatePeer._THAI_BUDDHIST_YEAR_OFFSET : 0)), "id":AdfRichUIPeer.CreateSubId(clientId, AdfDhtmlChooseDatePeer._CAL_GRID_ID), "class":laf.getStyleClass("af|chooseDate::calendar-grid"), "data-afr-par":this._getParentID(component, 
  rootDOMElement)});
  var calendarDomTableBody = this._createAndAppendElement("tbody", {}, calendarDomTable);
  calendarDomTableBody.appendChild(this._buildWallCalendarGridHeader(component, rootDOMElement));
  var firstDayOfMonth = (new Date(showYear, showMonth, 1)).getDay();
  var daysInMonth = this._getDaysInMonth(showYear, showMonth);
  var leadDays = (firstDayOfMonth - this._getFirstDayOfTheWeek(component, rootDOMElement) + 7) % 7;
  var curRows = Math.ceil((leadDays + daysInMonth) / 7);
  var lastRowIndex = curRows - 1;
  var rowStylesMap = {};
  rowStylesMap[0] = "p_AFFirst";
  rowStylesMap[lastRowIndex] = "p_AFLast";
  var printDate = new Date(showYear, showMonth, 1 - leadDays, 0, 0, 0, 0);
  var tabIndexZeroMonth = printDate.getMonth();
  var tabIndexZeroDate = printDate.getDate();
  var monthToBeSelected;
  var dayToBeSelected;
  if(dateToBeSelected.getFullYear() == showYear) {
    tabIndexZeroDate = dayToBeSelected = dateToBeSelected.getDate();
    tabIndexZeroMonth = monthToBeSelected = dateToBeSelected.getMonth()
  }
  for(var dRow = 0;dRow < curRows;dRow++) {
    var calendarGridRow = this._buildCalendarGridRow(component, laf.getStyleClass("af|chooseDate::days-row") + (rowStylesMap[dRow] ? " " + rowStylesMap[dRow] : ""), printDate, showMonth, tabIndexZeroMonth, tabIndexZeroDate, monthToBeSelected, dayToBeSelected, rootDOMElement);
    calendarDomTableBody.appendChild(calendarGridRow)
  }
  return calendarDomTable
};
AdfDhtmlChooseDatePeer.prototype._buildWallCalendarGridHeader = function(component, rootDOMElement) {
  var laf = AdfPage.PAGE.getLookAndFeel();
  var localeSymbols = this._getLocaleSymbols(component, rootDOMElement);
  var dayNames = localeSymbols.getWeekdays();
  var dayNamesMin = localeSymbols.getShortWeekdays();
  var calendarGridHeaderRow = this._createElementWithAttributes("tr", {"role":"row", "class":laf.getStyleClass("af|chooseDate::week-header-row")});
  var firstDay = this._getFirstDayOfTheWeek(component, rootDOMElement);
  for(var dow = 0;dow < 7;dow++) {
    var day = (firstDay + dow) % 7;
    var th = this._createAndAppendElement("th", {"class":laf.getStyleClass("af|chooseDate::week-header-cell"), "role":"columnheader", "scope":"col", "aria-label":dayNames[day]}, calendarGridHeaderRow);
    th.textContent = dayNamesMin[day]
  }
  return calendarGridHeaderRow
};
AdfDhtmlChooseDatePeer.prototype._buildCalendarGridRow = function(component, rowStyle, printDate, drawMonth, tabIndexZeroMonth, tabIndexZeroDate, monthToBeSelected, dateToBeSelected, rootDOMElement) {
  var laf = AdfPage.PAGE.getLookAndFeel();
  var today = this._getTodayDate(component, rootDOMElement);
  var dayStyles = {"-1":laf.getStyleClass("af|chooseDate::prev-month-day"), 0:laf.getStyleClass("af|chooseDate::regular-day"), 1:laf.getStyleClass("af|chooseDate::next-month-day")};
  var adfDayValueMap = {"-1":AdfDhtmlChooseDatePeer._PREV_MONTH_ID, 1:AdfDhtmlChooseDatePeer._NEXT_MONTH_ID};
  var calendarGridRow = this._createElementWithAttributes("tr", {"role":"row", "class":rowStyle});
  for(var dow = 0;dow < 7;dow++) {
    var currDate = printDate.getDate();
    var currMonth = printDate.getMonth();
    var isDateDisabled = this._isDisabled(component, printDate);
    var dayColumn = this._createAndAppendElement("td", {"role":"gridcell", "aria-disabled":isDateDisabled ? true : undefined, "tabindex":currMonth == tabIndexZeroMonth && currDate == tabIndexZeroDate ? 0 : -1, "class":this._getDayStyle(component, dayStyles, printDate, drawMonth, today, monthToBeSelected, dateToBeSelected, isDateDisabled)}, calendarGridRow);
    var diff = printDate.getMonth() - drawMonth;
    if(diff > 1) {
      diff = -1
    }else {
      if(diff < -1) {
        diff = 1
      }
    }
    var adfday = adfDayValueMap[diff];
    if(adfday) {
      dayColumn.setAttribute(AdfDhtmlChooseDatePeer._DAY_ID_ATTR_NAME, adfday)
    }
    dayColumn.textContent = currDate;
    printDate.setDate(printDate.getDate() + 1)
  }
  return calendarGridRow
};
AdfDhtmlChooseDatePeer.prototype._buildTimeSelectionDOM = function(component, rootDOMElement, dateToBeSelected) {
  var laf = AdfPage.PAGE.getLookAndFeel();
  var timeSelectionRow = this._createElementWithAttributes("tr", {});
  var timeSelectionColumn = this._createAndAppendElement("td", {"class":laf.getStyleClass("af|chooseDate::time-selectors-row")}, timeSelectionRow);
  var timeSelectionTable = this._createAndAppendElement("table", {"cellpadding":"0", "cellspacing":"0", "border":"0", "summary":"", "role":"presentation"}, timeSelectionColumn);
  var timeSelectionTableBody = this._createAndAppendElement("tbody", {}, timeSelectionTable);
  var hourMinSecSelectionRow = this._buildHHMMSSSelectionRow(component, rootDOMElement, dateToBeSelected);
  timeSelectionTableBody.appendChild(hourMinSecSelectionRow);
  if(!this._is24HourFormat(component, rootDOMElement) && this._allowAMPMSelection(component, rootDOMElement)) {
    var showAMPMInTwoRows = this._showAMPMInTwoRows(component, rootDOMElement);
    var amPmSelectionRow = this._buildAMPMButtonsRow(component, rootDOMElement, dateToBeSelected, showAMPMInTwoRows);
    if(showAMPMInTwoRows) {
      timeSelectionTableBody.appendChild(amPmSelectionRow)
    }else {
      hourMinSecSelectionRow.appendChild(amPmSelectionRow)
    }
  }
  return timeSelectionRow
};
AdfDhtmlChooseDatePeer.prototype._buildHHMMSSSelectionRow = function(component, rootDOMElement, showDate) {
  var laf = AdfPage.PAGE.getLookAndFeel();
  var timeSelectionTableRow = this._createElementWithAttributes("tr", {});
  var hourSpinboxColumn = this._createAndAppendElement("td", {}, timeSelectionTableRow);
  var is24HourFormat = this._is24HourFormat(component, rootDOMElement);
  var isZeroBased = this._isHourZeroBased(component, rootDOMElement);
  var hourMin = is24HourFormat ? 0 : 0 + (isZeroBased ? 0 : 1);
  var hourMax = is24HourFormat ? 23 : 11 + (isZeroBased ? 0 : 1);
  var showHour = is24HourFormat ? showDate.getHours() : showDate.getHours() % 12;
  if(!is24HourFormat && showHour == 0) {
    showHour = 12
  }
  var hourSpinbox = this._buildNumberSpinboxElement(AdfRichUIPeer.CreateSubId(component.getClientId(), AdfDhtmlChooseDatePeer._HOUR_SPIN_ID), showHour, hourMin, hourMax, this._getHourDigitCount(component, rootDOMElement), laf.getTranslatedString("af_chooseDate.LABEL_SELECT_HOURS"));
  hourSpinboxColumn.appendChild(hourSpinbox);
  var hourMinSeperatorColumn = this._createAndAppendElement("td", {"class":laf.getStyleClass("af|chooseDate::time-separator")}, timeSelectionTableRow);
  hourMinSeperatorColumn.textContent = ":";
  var minuteSpinboxColumn = this._createAndAppendElement("td", {}, timeSelectionTableRow);
  var minSpinbox = this._buildNumberSpinboxElement(AdfRichUIPeer.CreateSubId(component.getClientId(), AdfDhtmlChooseDatePeer._MIN_SPIN_ID), showDate.getMinutes(), 0, 59, this._getMinuteDigitCount(component, rootDOMElement), laf.getTranslatedString("af_chooseDate.LABEL_SELECT_MINUTES"));
  minuteSpinboxColumn.appendChild(minSpinbox);
  var minSecSeperatorColumn = this._createAndAppendElement("td", {"class":laf.getStyleClass("af|chooseDate::time-separator")}, timeSelectionTableRow);
  minSecSeperatorColumn.textContent = ":";
  var secondsSpinboxColumn = this._createAndAppendElement("td", {}, timeSelectionTableRow);
  var secSpinbox = this._buildNumberSpinboxElement(AdfRichUIPeer.CreateSubId(component.getClientId(), AdfDhtmlChooseDatePeer._SEC_SPIN_ID), showDate.getSeconds(), 0, 59, this._getSecondDigitCount(component, rootDOMElement), laf.getTranslatedString("af_chooseDate.LABEL_SELECT_SECONDS"));
  secondsSpinboxColumn.appendChild(secSpinbox);
  return timeSelectionTableRow
};
AdfDhtmlChooseDatePeer.prototype._buildAMPMButtonsRow = function(component, rootDOMElement, dateToBeSelected, showInTwoRows) {
  var laf = AdfPage.PAGE.getLookAndFeel();
  var parentElement;
  var amPmColumn;
  if(showInTwoRows) {
    parentElement = this._createElementWithAttributes("tr", {});
    amPmColumn = this._createAndAppendElement("td", {"colspan":"3"}, parentElement)
  }else {
    parentElement = this._createElementWithAttributes("td", {});
    amPmColumn = parentElement
  }
  var amPmSubID = AdfRichUIPeer.CreateSubId(component.getClientId(), AdfDhtmlChooseDatePeer._AMPM_ID);
  var outerDiv = this._createAndAppendElement("div", {"id":amPmSubID, "class":laf.getStyleClass("af|chooseDate::ampm")}, amPmColumn);
  var innerDiv = this._createAndAppendElement("div", {"id":AdfRichUIPeer.CreateSubId(amPmSubID, "content"), "name":amPmSubID, "class":laf.getStyleClass("af|chooseDate::ampm-content")}, outerDiv);
  var amSpan = this._createAndAppendElement("span", {"class":laf.getStyleClass("af|chooseDate::ampm-content-input")}, innerDiv);
  var amInputRadio = this._createAndAppendElement("input", {"type":"radio", "name":amPmSubID, "id":amPmSubID + ":_0", "value":"0", "class":laf.getStyleClass("af|selectOneRadio::native-input"), "accesskey":"", "checked":dateToBeSelected.getHours() < 12 ? "" : undefined, "onclick":"this.focus()"}, amSpan);
  amInputRadio.checked = dateToBeSelected.getHours() < 12;
  var amLabel = this._createAndAppendElement("label", {"for":amPmSubID + ":_0", "class":laf.getStyleClass("af|chooseDate::ampm-item-text")}, innerDiv);
  amLabel.textContent = "AM";
  var pmSpan = this._createAndAppendElement("span", {"class":laf.getStyleClass("af|chooseDate::ampm-content-input")}, innerDiv);
  var pmInputRadio = this._createAndAppendElement("input", {"type":"radio", "name":amPmSubID, "id":amPmSubID + ":_1", "value":"1", "class":laf.getStyleClass("af|selectOneRadio::native-input"), "accesskey":"", "checked":dateToBeSelected.getHours() >= 12 ? "" : undefined, "onclick":"this.focus()"}, pmSpan);
  pmInputRadio.checked = dateToBeSelected.getHours() >= 12;
  var pmLabel = this._createAndAppendElement("label", {"for":amPmSubID + ":_1", "class":laf.getStyleClass("af|chooseDate::ampm-item-text")}, innerDiv);
  pmLabel.textContent = "PM";
  var radioComponent = new AdfRichSelectOneRadio(amPmSubID, {"simple":true, "layout":"horizontal"}, 1);
  this._childComponents.push(radioComponent);
  return parentElement
};
AdfDhtmlChooseDatePeer.prototype._buildTimeZoneSelectionDOM = function(component, rootDOMElement) {
  var laf = AdfPage.PAGE.getLookAndFeel();
  var addTimeZone = this._getClientTimeZone(component, rootDOMElement);
  var timeZoneList = AdfPage.PAGE.findComponent(this._getParentID(component, rootDOMElement)).getTimeZoneList();
  var timeZoneNames = AdfDhtmlChooseDatePeer._getTimeZones(timeZoneList, addTimeZone);
  var timeZoneSelectionRow = this._createElementWithAttributes("tr", {});
  var timeZoneSelectionColumn = this._createAndAppendElement("td", {"class":laf.getStyleClass("af|chooseDate::timezone-selectors-row"), "colspan":"0"}, timeZoneSelectionRow);
  var selectedTimeZone = this._getSelectedTimeZone(component, rootDOMElement);
  var timeZoneSelectSpan = this._buildSelectOneChoiceElement(AdfRichUIPeer.CreateSubId(component.getClientId(), AdfDhtmlChooseDatePeer._TIMEZONE_ID), laf.getStyleClass("af|chooseDate::timezone-list-content"), laf.getTranslatedString("af_chooseDate.LABEL_SELECT_TIMEZONE"), timeZoneNames, selectedTimeZone);
  timeZoneSelectionColumn.appendChild(timeZoneSelectSpan);
  return timeZoneSelectionRow
};
AdfDhtmlChooseDatePeer.prototype._buildSelectOneChoiceElement = function(selectElementID, styleClass, componentLabelText, selectItems, selectedValue) {
  var laf = AdfPage.PAGE.getLookAndFeel();
  var selectContentId = AdfRichUIPeer.CreateSubId(selectElementID, "content");
  var selectConfig = this._buildSelectOneChoiceOptions(selectItems, selectedValue);
  var domTemplate = {"node":"span", "id":selectElementID, "class":laf.getStyleClass("af|chooseDate::choice-list"), "children":[{"node":"select", "id":selectContentId, "name":selectElementID, "class":styleClass, "title":selectConfig.title, "children":selectConfig.optionsArray}, {"node":"label", "for":selectContentId, "class":"p_OraHiddenLabel", "text-content":componentLabelText}]};
  var socComponent = new AdfRichSelectOneChoice(selectElementID, {"simple":true}, 1);
  this._childComponents.push(socComponent);
  return this._buildDomFromStructure(domTemplate)
};
AdfDhtmlChooseDatePeer.prototype._buildSelectOneChoiceOptions = function(selectItems, selectedValue) {
  var selectConfig = {};
  selectConfig.optionsArray = [];
  selectConfig.title = "";
  for(var i = 0;i < selectItems.length;i++) {
    var value = Object.keys(selectItems[i])[0];
    var label = selectItems[i][value];
    var option = {"node":"option", "value":value};
    if(selectedValue == value) {
      option["selected"] = "";
      selectConfig.title = label
    }
    option["title"] = label;
    option["text-content"] = label;
    selectConfig.optionsArray[i] = option
  }
  return selectConfig
};
AdfDhtmlChooseDatePeer.prototype._buildNumberSpinboxElement = function(spinBoxID, value, minValue, maxValue, minDigits, componentLabelText) {
  var laf = AdfPage.PAGE.getLookAndFeel();
  var incrementAnchorId = AdfRichUIPeer.CreateSubId(spinBoxID, AdfDhtmlChooseDatePeer._INCREMENT_ID);
  var decrementAnchorId = AdfRichUIPeer.CreateSubId(spinBoxID, AdfDhtmlChooseDatePeer._DECREMENT_ID);
  var inputContentId = AdfRichUIPeer.CreateSubId(spinBoxID, "content");
  var numberConverter = new TrNumberConverter(null, "number", null, null, false, true, false, null, null, null, null, null, minDigits, null, null, null);
  var domTemplate = {"node":"div", "id":spinBoxID, "class":laf.getStyleClass("af|chooseDate::spinbox"), "_adfinc":incrementAnchorId, "_adfdec":decrementAnchorId, "children":[{"node":"table", "cellpadding":0, "cellspacing":0, "border":0, "summary":"", "role":"presentation", "children":[{"node":"tbody", "children":[{"node":"tr", "children":[{"node":"td", "children":[{"node":"input", "id":inputContentId, "name":spinBoxID, "style":"text-align: right;width:auto;", "class":laf.getStyleClass("af|chooseDate::spinbox-content"), 
  "size":minDigits, "autocomplete":"off", "type":"text", "value":numberConverter.getAsString(value), "role":"spinbutton", "aria-valuemax":maxValue, "aria-valuemin":minValue, "title":value}, {"node":"label", "for":inputContentId, "class":"p_OraHiddenLabel", "text-content":componentLabelText}]}, {"node":"td", "children":[{"node":"div", "class":laf.getStyleClass("af|chooseDate::increment-cell"), "children":[{"node":"a", "role":"button", "tabindex":"-1", "class":laf.getStyleClass("af|chooseDate::spinbox-incrementor-icon-style"), 
  "id":incrementAnchorId, "title":laf.getTranslatedString("af_inputNumberSpinbox.TIP_INCREMENT")}]}, {"node":"div", "class":laf.getStyleClass("af|chooseDate::decrement-cell"), "children":[{"node":"a", "role":"button", "tabindex":"-1", "class":laf.getStyleClass("af|chooseDate::spinbox-decrementor-icon-style"), "id":decrementAnchorId, "title":laf.getTranslatedString("af_inputNumberSpinbox.TIP_DECREMENT")}]}]}]}]}]}]};
  var spinBoxComponent = new AdfRichInputNumberSpinbox(spinBoxID, {"minimum":minValue, "maximum":maxValue, "converter":numberConverter}, 1);
  this._childComponents.push(spinBoxComponent);
  return this._buildDomFromStructure(domTemplate)
};
AdfDhtmlChooseDatePeer.prototype._buildDomFromStructure = function(domTemplate) {
  var NODE_NAME = "node";
  var CHILDREN = "children";
  var TEXT_CONTENT = "text-content";
  var agent = AdfAgent.AGENT;
  var domElement = this._createElementWithAttributes(domTemplate[NODE_NAME], {});
  for(var key in domTemplate) {
    switch(key) {
      case CHILDREN:
        var children = domTemplate[key];
        for(var i = 0;i < children.length;i++) {
          domElement.appendChild(this._buildDomFromStructure(children[i]))
        }
        break;
      case TEXT_CONTENT:
        domElement.textContent = domTemplate[key];
        break;
      case NODE_NAME:
        break;
      default:
        agent.setAttribute(domElement, key, domTemplate[key]);
        break
    }
  }
  return domElement
};
AdfDhtmlChooseDatePeer.prototype._getDaysInMonth = function(year, month) {
  return 32 - (new Date(year, month, 32)).getDate()
};
AdfDhtmlChooseDatePeer.prototype._getDayStyle = function(component, dayStyles, printDate, drawMonth, today, selectedMonth, selectedDate, isDateDisabled) {
  var laf = AdfPage.PAGE.getLookAndFeel();
  var dayStyle = "";
  if(printDate.getYear() == today.getYear() && printDate.getMonth() == today.getMonth() && printDate.getDate() == today.getDate()) {
    dayStyle = laf.getStyleClass("af|chooseDate::today")
  }else {
    var diff = printDate.getMonth() - drawMonth;
    if(diff > 1) {
      diff = -1
    }else {
      if(diff < -1) {
        diff = 1
      }
    }
    dayStyle = dayStyles[diff]
  }
  if(isDateDisabled) {
    dayStyle += " " + AdfDhtmlChooseDatePeer._DISABLED_STYLE_CLASS
  }else {
    if(selectedDate && printDate.getMonth() == selectedMonth && printDate.getDate() == selectedDate) {
      dayStyle += " " + AdfDhtmlChooseDatePeer._SEL_DAY_CLASS
    }
  }
  return dayStyle
};
AdfDhtmlChooseDatePeer.prototype._isDisabled = function(component, printDate) {
  var dateTimeConverter = AdfDhtmlChooseDatePeer._getISOStandardConverter();
  var minDate = this._resetTimePart(dateTimeConverter.getAsObject(component.getMinValue()), false);
  if(minDate != null && printDate < minDate) {
    return true
  }
  var maxDate = this._resetTimePart(dateTimeConverter.getAsObject(component.getMaxValue()), true);
  if(maxDate != null && printDate > maxDate) {
    return true
  }
  var disabledMonths = component.getDisabledMonths();
  if(disabledMonths != null) {
    var disabledMths = Object.keys(disabledMonths);
    for(var m = 0;m < disabledMths.length;m++) {
      if(printDate.getMonth() == AdfDhtmlChooseDatePeer._DISABLED_MONTHS_KEYS[disabledMths[m]]) {
        return true
      }
    }
  }
  var disabledDaysOfWeek = component.getDisabledDaysOfWeek();
  if(disabledDaysOfWeek != null) {
    var disabledDOW = Object.keys(disabledDaysOfWeek);
    for(var d = 0;d < disabledDOW.length;d++) {
      if(printDate.getDay() == AdfDhtmlChooseDatePeer._DISABLED_DAYS_OF_WEEK_KEYS[disabledDOW[d]]) {
        return true
      }
    }
  }
  var disabledDays = component.getDisabledDays();
  if(disabledDays != null) {
    for(var i = 0;i < disabledDays.length;i++) {
      if(printDate.getTime() == this._resetTimePart(dateTimeConverter.getAsObject(disabledDays[i]), false).getTime()) {
        return true
      }
    }
  }
  return false
};
AdfDhtmlChooseDatePeer.prototype._resetTimePart = function(date, maxOut) {
  if(date != null) {
    date.setHours(maxOut ? 23 : 0);
    date.setMinutes(maxOut ? 59 : 0);
    date.setSeconds(maxOut ? 59 : 0);
    date.setMilliseconds(maxOut ? 999 : 0)
  }
  return date
};
AdfDhtmlChooseDatePeer.prototype._createAndAppendElement = function(elementName, attributesMap, parentElement) {
  AdfAssert.assert(parentElement != null);
  var newElement = this._createElementWithAttributes(elementName, attributesMap);
  parentElement.appendChild(newElement);
  return newElement
};
AdfDhtmlChooseDatePeer.prototype._createElementWithAttributes = function(elementName, attributesMap) {
  AdfAssert.assertNonEmptyString(elementName);
  var newElement = document.createElement(elementName);
  AdfDomUtils.writeAttributesToElement(newElement, attributesMap);
  return newElement
};
AdfDhtmlChooseDatePeer.prototype._getParentID = function(component, rootDOMElement) {
  AdfAssert.assert(rootDOMElement != null);
  var attrValue = AdfAgent.AGENT.getAttribute(rootDOMElement, AdfDhtmlChooseDatePeer._PARENT_ID);
  return attrValue
};
AdfDhtmlChooseDatePeer.prototype._getShowDate = function(component, rootDOMElement) {
  AdfAssert.assert(rootDOMElement != null);
  var showDate = AdfAgent.AGENT.getAttribute(rootDOMElement, AdfDhtmlChooseDatePeer._SHOW_DATE);
  return showDate != null ? AdfDhtmlChooseDatePeer._getISOStandardConverter().getAsObject(showDate) : this._getTodayDate(component, rootDOMElement)
};
AdfDhtmlChooseDatePeer.prototype._getTodayDate = function(component, rootDOMElement) {
  AdfAssert.assert(rootDOMElement != null);
  var todayDate = AdfAgent.AGENT.getAttribute(rootDOMElement, AdfDhtmlChooseDatePeer._TODAY_DATE);
  return todayDate != null ? AdfDhtmlChooseDatePeer._getISOStandardConverter().getAsObject(todayDate) : new Date
};
AdfDhtmlChooseDatePeer.prototype._setShowDate = function(component, rootDOMElement, newDate) {
  AdfAssert.assert(rootDOMElement != null);
  AdfAgent.AGENT.setAttribute(rootDOMElement, AdfDhtmlChooseDatePeer._SHOW_DATE, AdfDhtmlChooseDatePeer._getISOStandardConverter().getAsString(newDate))
};
AdfDhtmlChooseDatePeer.prototype._getClientRangeStartDate = function(component, rootDOMElement) {
  AdfAssert.assert(rootDOMElement != null);
  var attrValue = AdfAgent.AGENT.getAttribute(rootDOMElement, AdfDhtmlChooseDatePeer._RANGE_START);
  return attrValue != null ? AdfDhtmlChooseDatePeer._getISOStandardConverter().getAsObject(attrValue) : null
};
AdfDhtmlChooseDatePeer.prototype._setClientRangeStartDate = function(component, rootDOMElement, newDate) {
  AdfAssert.assert(rootDOMElement != null);
  AdfAgent.AGENT.setAttribute(rootDOMElement, AdfDhtmlChooseDatePeer._RANGE_START, AdfDhtmlChooseDatePeer._getISOStandardConverter().getAsString(newDate))
};
AdfDhtmlChooseDatePeer.prototype._getClientRangeEndDate = function(component, rootDOMElement) {
  AdfAssert.assert(rootDOMElement != null);
  var attrValue = AdfAgent.AGENT.getAttribute(rootDOMElement, AdfDhtmlChooseDatePeer._RANGE_END);
  return attrValue != null ? AdfDhtmlChooseDatePeer._getISOStandardConverter().getAsObject(attrValue) : null
};
AdfDhtmlChooseDatePeer.prototype._setClientRangeEndDate = function(component, rootDOMElement, newDate) {
  AdfAssert.assert(rootDOMElement != null);
  AdfAgent.AGENT.setAttribute(rootDOMElement, AdfDhtmlChooseDatePeer._RANGE_END, AdfDhtmlChooseDatePeer._getISOStandardConverter().getAsString(newDate))
};
AdfDhtmlChooseDatePeer.prototype._getFirstDayOfTheWeek = function(component, rootDOMElement) {
  AdfAssert.assert(rootDOMElement != null);
  var attrValue = AdfAgent.AGENT.getAttribute(rootDOMElement, AdfDhtmlChooseDatePeer._FIRST_DAY_OF_WEEK);
  return attrValue != null ? parseInt(attrValue) - 1 : 0
};
AdfDhtmlChooseDatePeer.prototype._allowTimeSelection = function(component, rootDOMElement) {
  AdfAssert.assert(rootDOMElement != null);
  var attrValue = AdfAgent.AGENT.getAttribute(rootDOMElement, AdfDhtmlChooseDatePeer._ALLOW_TIME_SELECTION);
  return attrValue != null
};
AdfDhtmlChooseDatePeer.prototype._getHourDigitCount = function(component, rootDOMElement) {
  AdfAssert.assert(rootDOMElement != null);
  var attrValue = AdfAgent.AGENT.getAttribute(rootDOMElement, AdfDhtmlChooseDatePeer._NUMBER_HOUR_DIGITS);
  return attrValue != null ? parseInt(attrValue) : 1
};
AdfDhtmlChooseDatePeer.prototype._is24HourFormat = function(component, rootDOMElement) {
  AdfAssert.assert(rootDOMElement != null);
  var attrValue = AdfAgent.AGENT.getAttribute(rootDOMElement, AdfDhtmlChooseDatePeer._SHOW_24_HOUR_FORMAT);
  return attrValue != null
};
AdfDhtmlChooseDatePeer.prototype._allowAMPMSelection = function(component, rootDOMElement) {
  AdfAssert.assert(rootDOMElement != null);
  var attrValue = AdfAgent.AGENT.getAttribute(rootDOMElement, AdfDhtmlChooseDatePeer._SHOW_AM_PM);
  return attrValue != null
};
AdfDhtmlChooseDatePeer.prototype._showAMPMInTwoRows = function(component, rootDOMElement) {
  AdfAssert.assert(rootDOMElement != null);
  var attrValue = AdfAgent.AGENT.getAttribute(rootDOMElement, AdfDhtmlChooseDatePeer._SHOW_AM_PM_IN_2_ROWS);
  return attrValue != null
};
AdfDhtmlChooseDatePeer.prototype._getMinuteDigitCount = function(component, rootDOMElement) {
  AdfAssert.assert(rootDOMElement != null);
  var attrValue = AdfAgent.AGENT.getAttribute(rootDOMElement, AdfDhtmlChooseDatePeer._NUMBER_MINUTE_DIGITS);
  return attrValue != null ? parseInt(attrValue) : 1
};
AdfDhtmlChooseDatePeer.prototype._getSecondDigitCount = function(component, rootDOMElement) {
  AdfAssert.assert(rootDOMElement != null);
  var attrValue = AdfAgent.AGENT.getAttribute(rootDOMElement, AdfDhtmlChooseDatePeer._NUMBER_SECOND_DIGITS);
  return attrValue != null ? parseInt(attrValue) : 1
};
AdfDhtmlChooseDatePeer.prototype._allowTimeZoneSelection = function(component, rootDOMElement) {
  AdfAssert.assert(rootDOMElement != null);
  var attrValue = AdfAgent.AGENT.getAttribute(rootDOMElement, AdfDhtmlChooseDatePeer._SHOW_TIMEZONE);
  return attrValue != null
};
AdfDhtmlChooseDatePeer.prototype._isHourZeroBased = function(component, rootDOMElement) {
  AdfAssert.assert(rootDOMElement != null);
  var attrValue = AdfAgent.AGENT.getAttribute(rootDOMElement, AdfDhtmlChooseDatePeer._COUNT_ZERO_BASED);
  return attrValue != null
};
AdfDhtmlChooseDatePeer.prototype._getClientTimeZone = function(component, rootDOMElement) {
  AdfAssert.assert(rootDOMElement != null);
  return AdfAgent.AGENT.getAttribute(rootDOMElement, AdfDhtmlChooseDatePeer._CLIENT_TIME_ZONE)
};
AdfDhtmlChooseDatePeer.prototype._getSelectedTimeZone = function(component, rootDOMElement) {
  AdfAssert.assert(rootDOMElement != null);
  var parentId = this._getParentID(component, rootDOMElement);
  var tzId = AdfRichUIPeer.CreateSubId(parentId, AdfDhtmlChooseDatePeer._TIMEZONE_DISPID_ID);
  var tzIdNode = AdfAgent.AGENT.getElementById(tzId);
  return tzIdNode.value
};
AdfDhtmlChooseDatePeer.prototype._isThaiBuddistCalendar = function(component, rootDOMElement) {
  AdfAssert.assert(rootDOMElement != null);
  var locVal = AdfAgent.AGENT.getAttribute(rootDOMElement, AdfDhtmlChooseDatePeer._LOCALE);
  return locVal == AdfDhtmlChooseDatePeer.THAI_BUDDHIST
};
AdfDhtmlChooseDatePeer.prototype._getLocaleSymbols = function(component, rootDOMElement) {
  var page = AdfPage.PAGE;
  var localeSymbols = null;
  var parentId = this._getParentID(component, rootDOMElement);
  if(parentId) {
    var parentInputDate = page.findComponent(parentId);
    if(parentInputDate && parentInputDate.getConverter) {
      var converter = parentInputDate.getConverter();
      if(converter) {
        localeSymbols = converter.getLocaleSymbols()
      }
    }
  }
  if(!localeSymbols) {
    localeSymbols = getLocaleSymbols(page.getLocaleContext().getLocale())
  }
  return localeSymbols
};
AdfDhtmlChooseDatePeer._getTimeZones = function(timeZones, addTimeZone) {
  if(!timeZones) {
    return AdfDhtmlChooseDatePeer._getDefaultTimeZones(addTimeZone)
  }else {
    var addTimeZoneValue = "";
    var addTimeZoneOffset = -1;
    var addTimeZoneObject = {};
    var added = false;
    var allTimeZones = AdfRichTimeZoneTranslations.getTimeZoneTranslations();
    var allTimeZonesKeys = [];
    for(var i = 0;i < allTimeZones.length;i++) {
      allTimeZonesKeys[i] = Object.keys(allTimeZones[i])[0]
    }
    if(addTimeZone) {
      if(timeZones.indexOf(addTimeZone) != -1) {
        added = true
      }else {
        addTimeZoneValue = allTimeZones[allTimeZonesKeys.indexOf(addTimeZone)][addTimeZone];
        addTimeZoneOffset = AdfDhtmlChooseDatePeer._getMinutesFromTimeZoneValue(addTimeZoneValue);
        addTimeZoneObject[addTimeZone] = addTimeZoneValue
      }
    }
    var givenTimeZones = [];
    var totalTimeZones = timeZones.length + (addTimeZone && !added ? 1 : 0);
    var count = 0;
    for(var i = 0;i < totalTimeZones && count < timeZones.length;i++) {
      var TimeZoneObject = {};
      var key = timeZones[count];
      count++;
      var index = allTimeZonesKeys.indexOf(key);
      if(index != -1) {
        TimeZoneObject[key] = allTimeZones[index][key];
        if(addTimeZone && !added) {
          if(AdfDhtmlChooseDatePeer._getMinutesFromTimeZoneValue(TimeZoneObject[key]) > addTimeZoneOffset) {
            givenTimeZones[i] = addTimeZoneObject;
            i++;
            added = true
          }
        }
        givenTimeZones[i] = TimeZoneObject
      }
    }
    if(addTimeZone && !added) {
      var i = totalTimeZones - 1;
      givenTimeZones[i] = addTimeZoneObject
    }
    return givenTimeZones
  }
};
AdfDhtmlChooseDatePeer._getDefaultTimeZones = function(addTimeZone) {
  var allTimeZones = AdfRichTimeZoneTranslations.getTimeZoneTranslations();
  var added = false;
  var commonTimeZones = [];
  if(!AdfDhtmlChooseDatePeer._CACHED_COMMON_TIMEZONES) {
    for(var i = 0;i < allTimeZones.length;i++) {
      if(allTimeZones[i]["common"] != "true") {
        break
      }
      delete allTimeZones[i].common;
      commonTimeZones[i] = allTimeZones[i];
      if(allTimeZones[i][Object.keys(allTimeZones[i])] == addTimeZone) {
        added = true
      }
    }
    AdfDhtmlChooseDatePeer._CACHED_COMMON_TIMEZONES = commonTimeZones
  }else {
    commonTimeZones = AdfDhtmlChooseDatePeer._CACHED_COMMON_TIMEZONES
  }
  if(!addTimeZone) {
    return commonTimeZones
  }
  var cloneCommonTimeZones = commonTimeZones.slice(0);
  if(!added) {
    var addTimeZoneIndex = -1;
    var addTimeZoneValue, addTimeZoneOffset;
    for(var i = cloneCommonTimeZones.length - 1;i < allTimeZones.length;i++) {
      if(Object.keys(allTimeZones[i])[0] == addTimeZone) {
        addTimeZoneValue = allTimeZones[i][addTimeZone];
        addTimeZoneOffset = AdfDhtmlChooseDatePeer._getMinutesFromTimeZoneValue(addTimeZoneValue);
        break
      }
    }
    for(var i = 0;i < cloneCommonTimeZones.length;i++) {
      if(Object.keys(cloneCommonTimeZones[i])[0] == addTimeZone) {
        added = true;
        break
      }
      if(AdfDhtmlChooseDatePeer._getMinutesFromTimeZoneValue(cloneCommonTimeZones[i][Object.keys(cloneCommonTimeZones[i])[0]]) > addTimeZoneOffset) {
        addTimeZoneIndex = i;
        break
      }
    }
    if(!added) {
      if(addTimeZoneIndex == -1) {
        addTimeZoneIndex = cloneCommonTimeZones.length
      }
      if(addTimeZoneValue) {
        var addTimeZoneObject = {};
        addTimeZoneObject[addTimeZone] = addTimeZoneValue;
        cloneCommonTimeZones.splice(addTimeZoneIndex, 0, addTimeZoneObject)
      }
    }
  }
  return cloneCommonTimeZones
};
AdfDhtmlChooseDatePeer._getMinutesFromTimeZoneValue = function(value) {
  var offset = value.match("[+-][0-9]{2}:[0-9]{2}")[0];
  var hours = parseInt(offset.match("[0-9]{2}"));
  var min = parseInt(offset.match("(?![0-9]{2}:)[0-9]{2}"));
  var totalMinutes = hours * 60 + min;
  totalMinutes = parseInt(offset[0] + totalMinutes);
  return totalMinutes
};
AdfDhtmlChooseDatePeer._getISOStandardConverter = function() {
  if(!AdfDhtmlChooseDatePeer.ISO_STANDARD_CONVERTER) {
    AdfDhtmlChooseDatePeer.ISO_STANDARD_CONVERTER = new TrDateTimeConverter("yyyy-MM-dd HH:mm:ss", null, null, null, null)
  }
  return AdfDhtmlChooseDatePeer.ISO_STANDARD_CONVERTER
};
