AdfRichUIPeer.createPeerClass(AdfDhtmlInputBasePeer, "AdfDhtmlInputDatePeer");
AdfDhtmlInputDatePeer.prototype.getConvertedValue = function(component, submittedValue) {
  var newValue = submittedValue;
  if(component == null) {
    component = this.getComponent()
  }
  var losslessConverter = component.getProperty("_losslessConverter");
  if(!losslessConverter) {
    return AdfDhtmlInputDatePeer.superclass.getConvertedValue.call(this, component, submittedValue)
  }else {
    var converter = component.getConverter();
    if(converter != null) {
      var label = component.getProperty("label");
      try {
        newValue = converter.getAsObject(submittedValue, label)
      }catch(e) {
        try {
          newValue = losslessConverter.getAsObject(submittedValue, label)
        }catch(losslessException) {
          throw e;
        }
      }
    }
  }
  return newValue
};
AdfDhtmlInputDatePeer.prototype.handleReturnFromChooseComponent = function(inputComponent, hidePopup) {
  if(hidePopup) {
    this._hidePopup(inputComponent)
  }
  var agent = AdfAgent.AGENT;
  if(agent.getCapabilities()[AdfAgent.CAP_TOUCH_SCREEN] == AdfAgent.CAP_TOUCH_SCREEN_NONE) {
    var inputDom = AdfDhtmlEditableValuePeer.getContentNode(inputComponent);
    AdfFocusUtils.focusElement(inputDom)
  }
  var rootDomElem = this.getDomElement();
  agent.setExpandoProperty(rootDomElem, AdfDhtmlInputDatePeer._UPDATE_FROM_CHOOSEDATE_ATTR, "t");
  this.Validate(inputComponent);
  agent.setExpandoProperty(rootDomElem, AdfDhtmlInputDatePeer._UPDATE_FROM_CHOOSEDATE_ATTR, null);
  this._returnedFromChooseComponent = 1
};
AdfDhtmlInputDatePeer.prototype.handleUpdateFromChooseComponent = function(inputComponent, propertyName, newValue) {
  if(propertyName == AdfUIValue.VALUE) {
    this._updateLosslessNode(inputComponent, newValue);
    var dateAsString = this.getConvertedObject(inputComponent, newValue);
    this.SetDisplayValue(inputComponent, null, dateAsString)
  }else {
    if(propertyName == AdfDhtmlChooseDatePeer.TIMEZONE_SEL_DISPLAY) {
      var tzDisp = AdfRichUIPeer.CreateSubId(inputComponent.getClientId(), AdfDhtmlInputDatePeer._TIMEZONE_DISPNAME_ID);
      var tzDispNode = AdfAgent.AGENT.getElementById(tzDisp);
      AdfAgent.AGENT.setTextContent(tzDispNode, newValue)
    }else {
      if(propertyName == AdfDhtmlChooseDatePeer.TIMEZONE_SEL_ID) {
        var tzId = AdfRichUIPeer.CreateSubId(inputComponent.getClientId(), AdfDhtmlInputDatePeer._TIMEZONE_DISPID_ID);
        var tzIdNode = AdfAgent.AGENT.getElementById(tzId);
        tzIdNode.value = newValue
      }
    }
  }
};
AdfDhtmlInputDatePeer.InitSubclass = function() {
  AdfObject.ensureClassInitialization(AdfUIValue);
  AdfObject.ensureClassInitialization(AdfRichChooseDate);
  AdfObject.ensureClassInitialization(AdfRichInputDate);
  AdfObject.ensureClassInitialization(AdfRichPopup);
  AdfObject.ensureClassInitialization(AdfDhtmlChooseDatePeer);
  AdfRichUIPeer.addComponentEventHandlers(this, AdfUIInputEvent.KEY_DOWN_EVENT_TYPE, AdfUIInputEvent.KEY_PRESS_EVENT_TYPE, AdfUIInputEvent.CLICK_EVENT_TYPE, AdfDialogEvent.EVENT_TYPE, AdfUIInputEvent.FOCUS_EVENT_TYPE, AdfValueChangeEvent.VALUE_CHANGE_TYPE);
  AdfRichUIPeer.addComponentPropertyChanges(this, AdfUIValue.VALUE);
  AdfRichUIPeer.addComponentPropertyGetters(this, AdfRichInputDate.MIN_VALUE);
  AdfRichUIPeer.addComponentPropertyGetters(this, AdfRichInputDate.MAX_VALUE);
  AdfRichUIPeer.addComponentPropertyGetters(this, AdfRichInputDate.LABEL);
  AdfRichUIPeer.addComponentPropertyChanges(this, AdfRichInputDate.LABEL);
  this._CHILD_EXPANDO = "child";
  this._LOSSLESS_SUBID = "lcId";
  this._GLYPH_ID = "glyph";
  this._CHOOSEDATE_ID = "cd";
  this._POPUP_ID = "pop";
  this._TIMEZONE_ID = "tz";
  this._TIMEZONE_DISPID_ID = "tzDispId";
  this._TIMEZONE_DISPNAME_ID = "tzDispName";
  this._UPDATE_FROM_CHOOSEDATE_ATTR = "ufc";
  this._MIN_ATTR = "data-afr-adfmin";
  this._MAX_ATTR = "data-afr-adfmax";
  this._MIN_ISO_ATTR = "data-afr-adfmnis";
  this._MAX_ISO_ATTR = "data-afr-adfmxis"
};
AdfDhtmlInputDatePeer.prototype.InitDomElement = function(component, domElement) {
  AdfDhtmlInputDatePeer.superclass.InitDomElement.call(this, component, domElement);
  return AdfPage.PAGE.scheduleTimer(this, this._hookUpChooseDate, component.getClientId(), 0)
};
AdfDhtmlInputDatePeer.prototype.ComponentValueChanged = function(component, domElement, newValue, oldValue) {
  AdfDhtmlInputDatePeer.superclass.ComponentValueChanged.call(this, component, domElement, newValue, oldValue);
  if(this._isChooserSuppressed()) {
    var chooseDateId = component.getProperty(AdfRichInputDate.CHOOSE_ID);
    var rootDomElem = this.getDomElement();
    var isHandlingChooserUpdate = AdfAgent.AGENT.getExpandoProperty(rootDomElem, AdfDhtmlInputDatePeer._UPDATE_FROM_CHOOSEDATE_ATTR);
    if(chooseDateId != null && !isHandlingChooserUpdate) {
      AdfDhtmlInputChooseBindingUtils.updateChooseComponentProperty(component, chooseDateId, AdfUIValue.VALUE, AdfDhtmlChooseDatePeer.SELECTED_DATE)
    }
  }
  this._updateLosslessNode(component, newValue);
  var contentNode = AdfDhtmlEditableValuePeer.getContentNode(component, domElement);
  AdfDhtmlInputBasePeer.setLastValue(contentNode)
};
AdfDhtmlInputDatePeer.prototype.Validate = function(component, submittedValue) {
  if(submittedValue != null) {
    this._updateLosslessNode(component, null)
  }
  AdfDhtmlInputDatePeer.superclass.Validate.call(this, component, submittedValue)
};
AdfDhtmlInputDatePeer.prototype.GetSubmittedValue = function(component, domElement) {
  var lcn = this._getLosslessConvertedNode(component);
  if(lcn && lcn.value) {
    return lcn.value
  }else {
    return AdfDhtmlInputDatePeer.superclass.GetSubmittedValue.call(this, component, domElement)
  }
};
AdfDhtmlInputDatePeer.prototype.GetComponentLabel = function(component, domElement) {
  var agent = AdfAgent.AGENT;
  var labelElements = domElement.getElementsByTagName("LABEL");
  var contentId = AdfRichUIPeer.CreateSubId(component.getClientId(), "content");
  var compLabel = null;
  for(var i = 0;i < labelElements.length;i++) {
    if(agent.getAttribute(labelElements[i], "for") == contentId) {
      compLabel = labelElements[i];
      break
    }
  }
  return compLabel ? agent.getTextContent(compLabel) : null
};
AdfDhtmlInputDatePeer.prototype.HandleComponentClick = function(componentEvent) {
  AdfDhtmlInputDatePeer.superclass.HandleComponentClick.call(this, componentEvent);
  var sourceComponent = componentEvent.getSource();
  var nativeEvent = componentEvent.getNativeEvent();
  var eventTarget = AdfAgent.AGENT.getEventTarget(nativeEvent);
  var glyphId = AdfRichUIPeer.CreateSubId(sourceComponent.getClientId(), AdfDhtmlInputDatePeer._GLYPH_ID);
  var component = componentEvent.getCurrentTarget();
  if(component != sourceComponent) {
    return
  }
  if(this._isGlyphElement(eventTarget, glyphId)) {
    this._handleChooseDatePopupLaunch(component);
    componentEvent.cancel()
  }
};
AdfDhtmlInputDatePeer.prototype.HandleComponentDialog = function(componentEvent) {
  var component = this.getComponent();
  var outcome = componentEvent.getOutcome();
  if(outcome == AdfDialogEvent.OUTCOME_OK) {
    var chooseDateId = this._getRuntimeChooseDateId(component);
    var chooseDate = AdfPage.PAGE.findComponent(chooseDateId);
    var chooseDatePeer = chooseDate.getPeer();
    chooseDatePeer.bind(chooseDate);
    chooseDatePeer.submitValueToInput(null, chooseDate);
    componentEvent.cancel()
  }else {
    if(outcome == AdfDialogEvent.OUTCOME_CANCEL) {
      this._hidePopup(component);
      var glyph = this._getGlyph(component);
      if(glyph != null) {
        AdfFocusUtils.focusElement(glyph)
      }
      componentEvent.cancel()
    }
  }
};
AdfDhtmlInputDatePeer.prototype.HandleComponentFocus = function(componentEvent) {
  AdfDhtmlInputDatePeer.superclass.HandleComponentFocus.call(this, componentEvent);
  var component = this.getComponent();
  var chooseId = AdfDhtmlInputChooseBindingUtils.getChooseId(component);
  if(chooseId != null) {
    AdfDhtmlInputChooseBindingUtils.registerBinding(true, chooseId, component.getClientId())
  }
};
AdfDhtmlInputDatePeer.prototype.HandleComponentKeyDown = function(componentEvent) {
  this.StopArrowKeyBubbling(componentEvent);
  var evt = componentEvent.getNativeEvent();
  var keyCode = AdfAgent.AGENT.getKeyCode(evt);
  var cancelEvt = false;
  var component = this.getComponent();
  var sourceComponent = componentEvent.getSource();
  switch(keyCode) {
    case AdfKeyStroke.ENTER_KEY:
      this.RunValidation(component, componentEvent.getNativeEventTarget());
      break;
    case AdfKeyStroke.ARROWDOWN_KEY:
      if(!this._isChooserSuppressed() && component == sourceComponent) {
        this._handleChooseDatePopupLaunch(component);
        cancelEvt = true
      }
      break
  }
  if(cancelEvt) {
    componentEvent.cancel()
  }
};
AdfDhtmlInputDatePeer.prototype.HandleComponentKeyPress = function(componentEvent) {
  this.StopArrowKeyBubbling(componentEvent)
};
AdfDhtmlInputDatePeer.prototype.LazyInitialize = function(component, domElement) {
  AdfDhtmlInputDatePeer.superclass.LazyInitialize.call(this, component, domElement);
  this._createClientSideValidators(component, domElement)
};
AdfDhtmlInputDatePeer.prototype.HandleComponentValueChange = function(componentEvent) {
  var sourceId = componentEvent.getSource().getClientId();
  var component = this.getComponent();
  if(!this._isChooserSuppressed()) {
    return
  }
  var tzSubId = AdfRichUIPeer.CreateSubId(component.getClientId(), AdfDhtmlInputDatePeer._TIMEZONE_ID);
  if(sourceId == tzSubId) {
    var tzComp = AdfPage.PAGE.findComponent(tzSubId);
    var tzNode = tzComp.getPeer().getDomElement();
    var tzContent = AdfDhtmlEditableValuePeer.getContentNode(tzComp, tzNode);
    var tzId = AdfRichUIPeer.CreateSubId(component.getClientId(), AdfDhtmlInputDatePeer._TIMEZONE_DISPID_ID);
    var tzIdNode = AdfAgent.AGENT.getElementById(tzId);
    tzIdNode.value = tzContent.value
  }
};
AdfDhtmlInputDatePeer.prototype.IsSecret = function(component) {
  return false
};
AdfDhtmlInputDatePeer.prototype.SetDisplayValue = function(component, domElement, newValue) {
  AdfAssert.assertString(newValue);
  var domNode = AdfDhtmlEditableValuePeer.getContentNode(component, domElement);
  var domNodeTagName = AdfAgent.AGENT.getNodeName(domNode);
  var isInput = domNodeTagName == "INPUT";
  if(component.getReadOnly()) {
    AdfAgent.AGENT.setTextContent(domNode, newValue)
  }else {
    domNode.title = newValue;
    if(isInput) {
      domNode.value = newValue
    }else {
      AdfAgent.AGENT.setTextContent(domNode, newValue)
    }
  }
};
AdfDhtmlInputDatePeer.prototype.VetoShowNoteWindow = function(component) {
  if(this._isPopupVisible(component)) {
    return true
  }
  if(!this._isChooserSuppressed()) {
    var contentNode = AdfDhtmlEditableValuePeer.getContentNode(component);
    if(AdfPage.PAGE.getActiveDomElement() != contentNode) {
      return true
    }
  }
  return AdfDhtmlInputDatePeer.superclass.VetoShowNoteWindow.call(this)
};
AdfDhtmlInputDatePeer.prototype.GetComponentMinValue = function(component, domElement) {
  var inputDom = AdfDhtmlEditableValuePeer.getContentNode(component);
  var minISOString = AdfAgent.AGENT.getAttribute(inputDom, AdfDhtmlInputDatePeer._MIN_ISO_ATTR, -1);
  if(minISOString) {
    return AdfDhtmlInputDatePeer._getISOStandardConverter().getAsObject(minISOString)
  }
  return null
};
AdfDhtmlInputDatePeer.prototype.GetComponentMaxValue = function(component, domElement) {
  var inputDom = AdfDhtmlEditableValuePeer.getContentNode(component);
  var maxISOString = AdfAgent.AGENT.getAttribute(inputDom, AdfDhtmlInputDatePeer._MAX_ISO_ATTR, -1);
  if(maxISOString) {
    return AdfDhtmlInputDatePeer._getISOStandardConverter().getAsObject(maxISOString)
  }
  return null
};
AdfDhtmlInputDatePeer.prototype.GetInlineEditor = function(event) {
  return AdfDhtmlSimpleLabelEditor.getInlineEditor()
};
AdfDhtmlInputDatePeer.prototype.__trace = function(txt) {
  AdfLogger.LOGGER.severe("InputDatePeer: " + txt)
};
AdfDhtmlInputDatePeer.prototype._handleChooseDatePopupLaunch = function(component) {
  var popupComponent = this._getPopup(component);
  if(popupComponent != null) {
    if(!popupComponent.isPopupVisible()) {
      this.HideNoteWindow();
      var chooseDateId = this._getRuntimeChooseDateId(component);
      var chooseDateRoot = AdfAgent.AGENT.getElementById(chooseDateId);
      this._updateChooseDateExpandos(component, chooseDateRoot, chooseDateComp);
      var chooseDateComp = AdfPage.PAGE.findComponent(chooseDateId);
      var chooseDatePeer = chooseDateComp.getPeer();
      chooseDatePeer.bind(chooseDateComp);
      chooseDatePeer.hardRefreshDOM();
      popupComponent.show(this._getChooserPopupHints(component))
    }else {
      popupComponent.hide()
    }
  }else {
    this._showPopup(component)
  }
};
AdfDhtmlInputDatePeer.prototype._createClientSideValidators = function(component, domElement) {
  AdfAssert.assertDomElement(domElement);
  var inputDom = AdfDhtmlEditableValuePeer.getContentNode(component);
  var min = AdfAgent.AGENT.getAttribute(inputDom, AdfDhtmlInputDatePeer._MIN_ATTR, -1);
  var max = AdfAgent.AGENT.getAttribute(inputDom, AdfDhtmlInputDatePeer._MAX_ATTR, -1);
  var month = component.getDisabledMonths();
  var days = component.getDisabledDaysOfWeek();
  if(min || max) {
    var minISO = AdfAgent.AGENT.getAttribute(inputDom, AdfDhtmlInputDatePeer._MIN_ISO_ATTR, -1);
    var maxISO = AdfAgent.AGENT.getAttribute(inputDom, AdfDhtmlInputDatePeer._MAX_ISO_ATTR, -1);
    var rangeValidator = new TrDateTimeRangeValidator(max, min, null, maxISO, minISO);
    component.addValidator(rangeValidator)
  }
  if(days || month) {
    var restrictionValidator = new TrDateRestrictionValidator(days, month, null);
    component.addValidator(restrictionValidator)
  }
};
AdfDhtmlInputDatePeer.prototype._getGlyph = function(component) {
  var glyphId = AdfRichUIPeer.CreateSubId(component.getClientId(), AdfDhtmlInputDatePeer._GLYPH_ID);
  var glyph = AdfAgent.AGENT.getElementById(glyphId);
  return glyph
};
AdfDhtmlInputDatePeer.prototype._getPopup = function(component) {
  var popupId = this._getPopupId(component);
  var popup = AdfPage.PAGE.findComponent(popupId);
  return popup
};
AdfDhtmlInputDatePeer.prototype._showPopup = function(component) {
  var contentNode = AdfDhtmlEditableValuePeer.getContentNode(component);
  var ownerDoc = contentNode.ownerDocument;
  var agent = AdfAgent.AGENT;
  var popupId = this._getPopupId(component);
  var popupComponent = AdfPage.PAGE.findComponent(popupId);
  var chooseDateClientId = this._getRuntimeChooseDateId(component);
  var chooseDateRoot = agent.getElementById(chooseDateClientId);
  var chooseDateComp = AdfPage.PAGE.findComponent(chooseDateClientId);
  if(agent.getElementById(popupId) == null) {
    var popupContainerDiv = ownerDoc.createElement("div");
    contentNode.parentNode.appendChild(popupContainerDiv);
    agent.setAttribute(popupContainerDiv, "id", popupId);
    agent.setAttribute(popupContainerDiv, "style", "display:none");
    var popupContentSubid = AdfRichUIPeer.CreateSubId(popupId, "content");
    var popupContentContainerDiv = ownerDoc.createElement("div");
    popupContainerDiv.appendChild(popupContentContainerDiv);
    var popupContainerStyling = "top:auto; right:auto; left:auto; bottom:auto; width:auto; height:auto; position:relative;";
    agent.setAttribute(popupContentContainerDiv, "style", popupContainerStyling);
    agent.setAttribute(popupContentContainerDiv, "id", popupContentSubid);
    chooseDateRoot = ownerDoc.createElement("span");
    popupContentContainerDiv.appendChild(chooseDateRoot);
    agent.setAttribute(chooseDateRoot, "id", chooseDateClientId);
    popupComponent = new AdfRichPopup(popupId, {"contentDelivery":"immediate"});
    chooseDateComp = new AdfRichChooseDate(chooseDateClientId);
    this._updateChooseDateExpandos(component, chooseDateRoot, chooseDateComp);
    agent.elementsAdded(popupContainerDiv);
    AdfPage.PAGE.addComponents(chooseDateComp, popupComponent)
  }else {
    this._updateChooseDateExpandos(component, chooseDateRoot, chooseDateComp);
    var chooseDatePeer = chooseDateComp.getPeer();
    chooseDatePeer.BindToComponent(chooseDateComp, chooseDateRoot);
    chooseDatePeer.hardRefreshDOM()
  }
  AdfObject.ensureClassInitialization(AdfRichPopup);
  popupComponent.show(this._getChooserPopupHints(component))
};
AdfDhtmlInputDatePeer.prototype._updateChooseDateExpandos = function(inputDateComponent, chooseDateRoot, chooseDateComponent) {
  AdfAssert.assert(inputDateComponent != null);
  var agent = AdfAgent.AGENT;
  if(chooseDateRoot == null) {
    var chooseDateClientId = this._getRuntimeChooseDateId(inputDateComponent);
    chooseDateRoot = agent.getElementById(chooseDateClientId)
  }
  agent.setAttribute(chooseDateRoot, AdfDhtmlChooseDatePeer._PARENT_ID, inputDateComponent.getClientId());
  var value = inputDateComponent.getValue();
  var contentNode = AdfDhtmlEditableValuePeer.getContentNode(inputDateComponent);
  var dateTimeConverter = AdfDhtmlInputDatePeer._getISOStandardConverter();
  var todayStr = agent.getAttribute(contentNode, AdfDhtmlChooseDatePeer._TODAY_DATE);
  var todayDate = dateTimeConverter.getAsObject(todayStr);
  if(value == null) {
    value = todayDate
  }
  var valStr = dateTimeConverter.getAsString(value);
  agent.setAttribute(chooseDateRoot, AdfDhtmlChooseDatePeer._SELECTED_DATE, valStr);
  agent.setAttribute(chooseDateRoot, AdfDhtmlChooseDatePeer._SHOW_DATE, valStr);
  agent.setAttribute(chooseDateRoot, AdfDhtmlChooseDatePeer._TODAY_DATE, todayStr);
  var showDateStr = agent.getAttribute(contentNode, AdfDhtmlChooseDatePeer._SHOW_DATE);
  if(showDateStr != null) {
    var showDate = dateTimeConverter.getAsObject(showDateStr);
    showDate.setYear(showDate.getFullYear() - AdfDhtmlChooseDatePeer._MAX_CLIENT_RANGE_YEARS / 2);
    showDate.setDate(1);
    agent.setAttribute(chooseDateRoot, AdfDhtmlChooseDatePeer._RANGE_START, dateTimeConverter.getAsString(showDate));
    showDate.setYear(showDate.getFullYear() + AdfDhtmlChooseDatePeer._MAX_CLIENT_RANGE_YEARS);
    agent.setAttribute(chooseDateRoot, AdfDhtmlChooseDatePeer._RANGE_END, dateTimeConverter.getAsString(showDate))
  }
  var firstDOWStr = agent.getAttribute(contentNode, AdfDhtmlChooseDatePeer._FIRST_DAY_OF_WEEK);
  if(firstDOWStr != null) {
    agent.setAttribute(chooseDateRoot, AdfDhtmlChooseDatePeer._FIRST_DAY_OF_WEEK, firstDOWStr)
  }
  var allowTmSelStr = agent.getAttribute(contentNode, AdfDhtmlChooseDatePeer._ALLOW_TIME_SELECTION);
  if(allowTmSelStr != null) {
    agent.setAttribute(chooseDateRoot, AdfDhtmlChooseDatePeer._ALLOW_TIME_SELECTION, allowTmSelStr)
  }
  var numHourDigStr = agent.getAttribute(contentNode, AdfDhtmlChooseDatePeer._NUMBER_HOUR_DIGITS);
  if(numHourDigStr != null) {
    agent.setAttribute(chooseDateRoot, AdfDhtmlChooseDatePeer._NUMBER_HOUR_DIGITS, numHourDigStr)
  }
  var show24HrStr = agent.getAttribute(contentNode, AdfDhtmlChooseDatePeer._SHOW_24_HOUR_FORMAT);
  if(show24HrStr != null) {
    agent.setAttribute(chooseDateRoot, AdfDhtmlChooseDatePeer._SHOW_24_HOUR_FORMAT, show24HrStr)
  }
  var showAMPMStr = agent.getAttribute(contentNode, AdfDhtmlChooseDatePeer._SHOW_AM_PM);
  if(showAMPMStr != null) {
    agent.setAttribute(chooseDateRoot, AdfDhtmlChooseDatePeer._SHOW_AM_PM, showAMPMStr)
  }
  var showAMPM2RowsStr = agent.getAttribute(contentNode, AdfDhtmlChooseDatePeer._SHOW_AM_PM_IN_2_ROWS);
  if(showAMPM2RowsStr != null) {
    agent.setAttribute(chooseDateRoot, AdfDhtmlChooseDatePeer._SHOW_AM_PM_IN_2_ROWS, showAMPM2RowsStr)
  }
  var numMinDigitsStr = agent.getAttribute(contentNode, AdfDhtmlChooseDatePeer._NUMBER_MINUTE_DIGITS);
  if(numMinDigitsStr != null) {
    agent.setAttribute(chooseDateRoot, AdfDhtmlChooseDatePeer._NUMBER_MINUTE_DIGITS, numMinDigitsStr)
  }
  var numSecDigitsStr = agent.getAttribute(contentNode, AdfDhtmlChooseDatePeer._NUMBER_SECOND_DIGITS);
  if(numSecDigitsStr != null) {
    agent.setAttribute(chooseDateRoot, AdfDhtmlChooseDatePeer._NUMBER_SECOND_DIGITS, numSecDigitsStr)
  }
  var showTZStr = agent.getAttribute(contentNode, AdfDhtmlChooseDatePeer._SHOW_TIMEZONE);
  if(showTZStr != null) {
    agent.setAttribute(chooseDateRoot, AdfDhtmlChooseDatePeer._SHOW_TIMEZONE, showTZStr)
  }
  var cntZeroStr = agent.getAttribute(contentNode, AdfDhtmlChooseDatePeer._COUNT_ZERO_BASED);
  if(cntZeroStr != null) {
    agent.setAttribute(chooseDateRoot, AdfDhtmlChooseDatePeer._COUNT_ZERO_BASED, cntZeroStr)
  }
  var selTZStr = agent.getAttribute(contentNode, AdfDhtmlChooseDatePeer._CLIENT_TIME_ZONE);
  if(selTZStr != null) {
    agent.setAttribute(chooseDateRoot, AdfDhtmlChooseDatePeer._CLIENT_TIME_ZONE, selTZStr)
  }
  if(chooseDateComponent) {
    chooseDateComponent.setDisabledDays(inputDateComponent.getDisabledDays());
    chooseDateComponent.setDisabledMonths(inputDateComponent.getDisabledMonths());
    chooseDateComponent.setDisabledDaysOfWeek(inputDateComponent.getDisabledDaysOfWeek());
    var minValStr = agent.getAttribute(contentNode, AdfDhtmlInputDatePeer._MIN_ISO_ATTR);
    chooseDateComponent.setMinValue(minValStr);
    var maxValStr = agent.getAttribute(contentNode, AdfDhtmlInputDatePeer._MAX_ISO_ATTR);
    chooseDateComponent.setMaxValue(maxValStr)
  }
};
AdfDhtmlInputDatePeer.prototype._getChooserPopupHints = function(component) {
  var hints = {};
  hints[AdfDhtmlPopupHints.FOCUS] = true;
  hints[AdfRichPopup.HINT_ALIGN] = AdfRichPopup.ALIGN_AFTER_START;
  hints[AdfRichPopup.HINT_ALIGN_ID] = AdfRichUIPeer.CreateSubId(component.getClientId(), AdfDhtmlInputDatePeer._GLYPH_ID);
  hints[AdfDhtmlPopupHints.CLOSE_HANDLER] = this.createCallback(this._chooserPopupClosedHandler);
  hints[AdfDhtmlPopupHints.CLOSE_HANDLER_PARAM] = {};
  var label = component.getLabel();
  if(!label) {
    var glyphElement = this._getGlyph(component);
    label = AdfAgent.AGENT.getAttribute(glyphElement, "title")
  }
  hints[AdfDhtmlPopupHints.ARIA_LABEL] = label;
  return hints
};
AdfDhtmlInputDatePeer.prototype._chooserPopupClosedHandler = function(config) {
  var component = this.getComponent();
  var inputElement = AdfDhtmlEditableValuePeer.getContentNode(component);
  AdfFocusUtils.focusElement(inputElement)
};
AdfDhtmlInputDatePeer.prototype._getPopupId = function(component) {
  return AdfRichUIPeer.CreateSubId(component.getClientId(), AdfDhtmlInputDatePeer._POPUP_ID)
};
AdfDhtmlInputDatePeer.prototype._getRuntimeChooseDateId = function(thisComponent) {
  var domElement = AdfDhtmlEditableValuePeer.getContentNode(thisComponent);
  var chooseDateId = AdfDhtmlInputChooseBindingUtils.getChooseId(thisComponent, AdfRichInputDate.CHOOSE_ID);
  if(chooseDateId == null) {
    var baseId = AdfRichUIPeer.CreateSubId(thisComponent.getClientId(), AdfDhtmlInputDatePeer._POPUP_ID);
    var child = domElement.getAttribute(AdfDhtmlInputDatePeer._CHILD_EXPANDO);
    if(child) {
      baseId = AdfRichUIPeer.CreateSubId(baseId, child)
    }
    return AdfRichUIPeer.CreateSubId(baseId, AdfDhtmlInputDatePeer._CHOOSEDATE_ID)
  }
  return chooseDateId
};
AdfDhtmlInputDatePeer.prototype._hidePopup = function(inputComponent) {
  var popup = this._getPopup(inputComponent);
  if(popup != null && popup.isPopupVisible()) {
    popup.hide()
  }
};
AdfDhtmlInputDatePeer.prototype._hookUpChooseDate = function(clientId) {
  var thisComponent = AdfPage.PAGE.findComponent(clientId);
  var chooseDateId = this._getRuntimeChooseDateId(thisComponent);
  if(chooseDateId != null) {
    AdfDhtmlInputChooseBindingUtils.registerBinding(true, chooseDateId, thisComponent.getClientId())
  }
};
AdfDhtmlInputDatePeer.prototype._isChooserSuppressed = function() {
  var domElement = AdfDhtmlEditableValuePeer.getContentNode(this.getComponent());
  var child = domElement.getAttribute(AdfDhtmlInputDatePeer._CHILD_EXPANDO);
  return child == "0"
};
AdfDhtmlInputDatePeer.prototype._isGlyphElement = function(eventTarget, glyphId) {
  var container = AdfAgent.AGENT.getElementById(glyphId);
  if(container == null) {
    return false
  }
  if(eventTarget == container) {
    return true
  }else {
    if(eventTarget == container.getElementsByTagName("img")[0]) {
      return true
    }
  }
  return false
};
AdfDhtmlInputDatePeer.prototype._isPopupVisible = function(component) {
  var popup = this._getPopup(component);
  if(popup != null && popup.isPopupVisible()) {
    return true
  }
  return false
};
AdfDhtmlInputDatePeer._getISOStandardConverter = function() {
  if(!AdfDhtmlInputDatePeer.ISO_STANDARD_CONVERTER) {
    AdfDhtmlInputDatePeer.ISO_STANDARD_CONVERTER = new TrDateTimeConverter("yyyy-MM-dd HH:mm:ss", null, null, null, null)
  }
  return AdfDhtmlInputDatePeer.ISO_STANDARD_CONVERTER
};
AdfDhtmlInputDatePeer.prototype._getLosslessConvertedObject = function(component, value) {
  if(value != null) {
    var valueString = value;
    var losslessConverter = component.getProperty("_losslessConverter");
    if(losslessConverter) {
      valueString = losslessConverter.getAsString(value, component.getProperty("label"));
      if(valueString === undefined) {
        return null
      }
    }
    return valueString
  }
  return null
};
AdfDhtmlInputDatePeer.prototype._getLosslessConvertedNode = function(component) {
  var lcId = AdfRichUIPeer.CreateSubId(component.getClientId(), AdfDhtmlInputDatePeer._LOSSLESS_SUBID);
  return AdfAgent.AGENT.getElementById(lcId)
};
AdfDhtmlInputDatePeer.prototype._updateLosslessNode = function(component, newValue) {
  var losslessNode = this._getLosslessConvertedNode(component);
  if(losslessNode) {
    if(!newValue) {
      losslessNode.value = ""
    }else {
      var convertedValue = this._getLosslessConvertedObject(component, newValue);
      losslessNode.value = convertedValue
    }
  }
};
