function AdfDhtmlChooseDateWallCalendarGridPanel(){AdfDhtmlChooseDateWallCalendarGridPanel.superclass.constructor.call(this,"date")}AdfObject.createSubclass(AdfDhtmlChooseDateWallCalendarGridPanel,AdfDhtmlChooseDateLayoutPanel);AdfDhtmlChooseDateLayoutPanel.registerLayoutPanel(AdfDhtmlChooseDateWallCalendarGridPanel);
AdfDhtmlChooseDateWallCalendarGridPanel.prototype.isVisible=function(a,b){AdfAssert.assertPrototype(a,AdfRichChooseDate);AdfAssert.assertDomElement(b);var d=!1;this.isEnabled(a,b)&&AdfDhtmlChooseDateDOMQueries.checkCurrentDisplayMode(a,b,AdfDhtmlChooseDatePeer._DATE_AND_TIME_MODE)&&(d=null==AdfDhtmlChooseDateDOMQueries.getCurrentDisplaySubMode(a,b));return d};
AdfDhtmlChooseDateWallCalendarGridPanel.prototype.canProcessDomUIInputEvent=function(a,b){AdfAssert.assertPrototype(a,AdfRichChooseDate);AdfAssert.assertPrototype(b,AdfDomUIInputEvent);var d=b.getNativeEventTarget();if(d){var e=AdfAgent.AGENT;if(e.getNodeName(d)==AdfDhtmlChooseDateWallCalendarGridPanel._DATE_CELL_NODE_TYPE){var f=this.getPanelRootElement(a);if(AdfDomUtils.isAncestor(f,d))return e.getAttribute(d,AdfDhtmlChooseDatePeer._DAY_ID_ATTR_NAME)!=AdfDhtmlChooseDatePeer._BLANK_CELL_ID}}return!1};
AdfDhtmlChooseDateWallCalendarGridPanel.prototype.canProcessComponentEvent=function(a,b){AdfAssert.assertPrototype(a,AdfRichChooseDate);AdfAssert.assertPrototype(b,AdfComponentEvent);return b instanceof AdfChooseDateYearSelectingEvent||b instanceof AdfChooseDateYearSelectionEvent||b instanceof AdfChooseDateMonthSelectingEvent||b instanceof AdfChooseDateMonthSelectionEvent||b instanceof AdfChooseDateSelectionsEvent?!0:!1};
AdfDhtmlChooseDateWallCalendarGridPanel.prototype.handleComponentClick=function(a,b){AdfAssert.assertPrototype(a,AdfRichChooseDate);AdfAssert.assertPrototype(b,AdfDomUIInputEvent);var d=AdfDhtmlChooseDateWallCalendarGridPanel,e=b.getNativeEventTarget(),f=AdfDhtmlChooseDateDOMQueries.getInputModifiersEngaged(b),g=this.getPanelRootElement(a);return d._selectDateInGrid(e,a,g,f)};
AdfDhtmlChooseDateWallCalendarGridPanel.prototype.handleComponentKeyDown=function(a,b){AdfAssert.assertPrototype(a,AdfRichChooseDate);AdfAssert.assertPrototype(b,AdfDomUIInputEvent);var d=AdfDhtmlChooseDateWallCalendarGridPanel,e=b.getNativeEventTarget(),f=AdfAgent.AGENT.getKeyCode(b.getNativeEvent()),g=this.getPanelRootElement(a);switch(f){case AdfKeyStroke.ARROWUP_KEY:case AdfKeyStroke.ARROWDOWN_KEY:case AdfKeyStroke.ARROWRIGHT_KEY:case AdfKeyStroke.ARROWLEFT_KEY:return d._handleArrowKeyNavigation(b,
g);case AdfKeyStroke.SPACE_KEY:return f=AdfDhtmlChooseDateDOMQueries.getInputModifiersEngaged(b),d._selectDateInGrid(e,a,g,f);case AdfKeyStroke.ENTER_KEY:f=AdfDhtmlChooseDateDOMQueries.getInputModifiersEngaged(b),d._selectDateInGrid(e,a,g,f)}return!1};
AdfDhtmlChooseDateWallCalendarGridPanel.prototype.handleComponentMonthSelection=AdfDhtmlChooseDateWallCalendarGridPanel.prototype.handleComponentYearSelection=function(a,b){AdfAssert.assertPrototype(a,AdfRichChooseDate);AdfAssert.assertPrototype(b,AdfComponentEvent);var d=b.getDate(),e=AdfDhtmlChooseDateDOMQueries.getDOMElement(a),e=AdfDhtmlChooseDateDOMQueries.getRenderedMonthAndYear(a,e);AdfAssert.assert(d.getFullYear()==e.getFullYear());AdfAssert.assert(d.getMonth()==e.getMonth());AdfDhtmlChooseDateWallCalendarGridPanel.updatePanelVisibility(a,
this);d=this.render(a,this.getPanelRootElement(a));AdfPage.PAGE.addComponents.apply(AdfPage.PAGE,d);return!0};AdfDhtmlChooseDateWallCalendarGridPanel.prototype.handleComponentMonthSelecting=AdfDhtmlChooseDateWallCalendarGridPanel.prototype.handleComponentYearSelecting=function(a,b){AdfAssert.assertPrototype(a,AdfRichChooseDate);AdfAssert.assertPrototype(b,AdfComponentEvent);AdfDhtmlChooseDateWallCalendarGridPanel.updatePanelVisibility(a,this)};
AdfDhtmlChooseDateWallCalendarGridPanel.prototype.handleComponentDateSelections=function(a,b){AdfAssert.assertPrototype(a,AdfRichChooseDate);AdfAssert.assertPrototype(b,AdfChooseDateSelectionsEvent);var d=AdfDhtmlChooseDateWallCalendarGridPanel,e=this.getPanelRootElement(a);d._clearCurrentSelections(a,e);if(0==b.getSelectedDates().length)return!0;var f={lookup:d._convertDateListToDateMap(b.getSelectedDates()),component:b.getSource(),selectedDateToCellMap:{}};AdfDomUtils.getChildElementsByMatch(e,
d._dateCellSelector,d._DATE_CELL_NODE_TYPE,f);b.shouldSelectTime()&&(d=new Date(b.getSelectedDates()[0]),d=AdfDhtmlChooseDateDOMQueries.resetTime(d,!1),null!=f.selectedDateToCellMap[d]&&AdfChooseDateTimeSelectionEvent.queue(a,b.getSelectedDates()[0]));return!0};
AdfDhtmlChooseDateWallCalendarGridPanel.prototype.render=function(a,b){AdfAssert.assertPrototype(a,AdfRichChooseDate);AdfAssert.assertDomElement(b);var d=AdfPage.PAGE.getLookAndFeel(),e=1==b.children.length?b.children[0]:AdfDhtmlChooseDateDOMUtils.createAndAppendElement(AdfDhtmlChooseDateWallCalendarGridPanel._DATE_CELL_NODE_TYPE,{"class":d.getStyleClass("af|chooseDate::calendar-grid-wrapper")},b);this._buildCalendarGrids(a,d,e,!1);AdfAgent.AGENT.elementsAdded(e);AdfChooseDateLoadEvent.queue(a);return[]};
AdfDhtmlChooseDateWallCalendarGridPanel.updatePanelVisibility=function(a,b){AdfAssert.assertPrototype(a,AdfRichChooseDate);AdfAssert.assertPrototype(b,AdfDhtmlChooseDateWallCalendarGridPanel);var d=AdfDhtmlChooseDateDOMQueries.getDOMElement(a),d=b.isVisible(a,d)?"":"display: none;";AdfAgent.AGENT.setAttribute(b.getPanelRootElement(a),"Style",d)};
AdfDhtmlChooseDateWallCalendarGridPanel.prototype.getSubIdDomElement=function(a,b){AdfAssert.assertPrototype(a,AdfRichChooseDate);AdfAssert.assertString(b);if(b==AdfDhtmlChooseDatePeer._SELECTED_DATE_SUB_ID)return this._getCurrentSelection(a,!1);if(b==AdfDhtmlChooseDatePeer._SELECTED_DATE_NEXT_SIBLING_SUB_ID){var d=this._getCurrentSelection(a,!1);return AdfDomUtils.getNextElement(d)}return b==AdfDhtmlChooseDatePeer._SELECTED_DATE_PREV_SIBLING_SUB_ID?(d=this._getCurrentSelection(a,!1),AdfDomUtils.getPreviousElement(d)):
b==AdfDhtmlChooseDatePeer._FIRST_OF_MONTH_SUB_ID?this._getFirstDayOfMonth(a):b.substring(0,5)==AdfDhtmlChooseDatePeer._DATE_SUB_ID+"["&&"]"==b.substring(b.length-1)&&14==b.length?this._getDayCell(a,b.substring(5,b.length-1)):b==AdfDhtmlChooseDatePeer._GRID_SUB_ID?AdfSubIdUtils.getSubIdElementById(a,AdfDhtmlChooseDatePeer._CAL_GRID_ID):null};
AdfDhtmlChooseDateWallCalendarGridPanel.prototype.getBestMatchSubId=function(a,b){AdfAssert.assertPrototype(a,AdfRichChooseDate);AdfAssert.assertDomElement(b);if(AdfDhtmlChooseDateDOMQueries.getCurrentSelectedDateElement(a)==b)return AdfDhtmlChooseDatePeer._SELECTED_DATE_SUB_ID;var d=AdfDhtmlChooseDateDOMQueries.getFirstDayOfMonthElement(a);return null!=d&&d==b?AdfDhtmlChooseDatePeer._FIRST_OF_MONTH_SUB_ID:AdfSubIdUtils.getSubIdElementById(a,AdfDhtmlChooseDatePeer._CAL_GRID_ID)==b?AdfDhtmlChooseDatePeer._GRID_SUB_ID:
null};AdfDhtmlChooseDateWallCalendarGridPanel.prototype._getCurrentSelection=function(a){return AdfDhtmlChooseDateDOMQueries.getCurrentSelectedDateElement(a)};AdfDhtmlChooseDateWallCalendarGridPanel.prototype._getDayCell=function(a,b){var d=parseInt(b.substring(0,4)),e=parseInt(b.substring(4,6))-1,f=parseInt(b.substring(6,8));return AdfDhtmlChooseDateDOMQueries.getDayCell(a,new Date(d,e,f,0,0,0,0))};AdfDhtmlChooseDateWallCalendarGridPanel.prototype._getFirstDayOfMonth=function(a){return AdfDhtmlChooseDateDOMQueries.getFirstDayOfMonthElement(a)};
AdfDhtmlChooseDateWallCalendarGridPanel._selectDateInGrid=function(a,b,d,e){AdfAssert.assertDomElement(a);AdfAssert.assertPrototype(b,AdfRichChooseDate);AdfAssert.assertDomElement(d);AdfAssert.assertArray(e);var f=AdfDhtmlChooseDateWallCalendarGridPanel;if(AdfDomUtils.containsCSSClassName(a,AdfDhtmlChooseDatePeer._DISABLED_STYLE_CLASS))return!1;f._clearCurrentSelections(b,d);AdfDomUtils.addCSSClassName(a,AdfDhtmlChooseDatePeer._SEL_DAY_CLASS);(a=f._getDateFromEventTarget(a,b))&&(new AdfChooseDateSelectionEvent(b,
a,e)).queue();return!0};AdfDhtmlChooseDateWallCalendarGridPanel._clearCurrentSelections=function(a,b){for(var d=AdfDomUtils.getChildElementsByMatch(b,AdfDhtmlChooseDateWallCalendarGridPanel._dateCellMatcher,AdfDhtmlChooseDateWallCalendarGridPanel._DATE_CELL_NODE_TYPE,!0),e=d?d.length:0,f=0;f<e;f++)AdfDomUtils.removeCSSClassName(d[f],AdfDhtmlChooseDatePeer._SEL_DAY_CLASS)};
AdfDhtmlChooseDateWallCalendarGridPanel._dateCellMatcher=function(a,b){AdfAssert.assertDomElement(a);if("TD"!=AdfAgent.AGENT.getNodeName(a))return!1;var d=AdfAgent.AGENT.getAttribute(a,AdfDhtmlChooseDatePeer._DAY_ID_ATTR_NAME);return d==AdfDhtmlChooseDatePeer._PREV_MONTH_ID||d==AdfDhtmlChooseDatePeer._NEXT_MONTH_ID||d==AdfDhtmlChooseDatePeer._CUR_MONTH_ID||d==AdfDhtmlChooseDatePeer._BLANK_CELL_ID?b?AdfDomUtils.containsCSSClassName(a,AdfDhtmlChooseDatePeer._SEL_DAY_CLASS):!0:!1};
AdfDhtmlChooseDateWallCalendarGridPanel._getDateFromEventTarget=function(a,b){var d=AdfDhtmlChooseDateWallCalendarGridPanel._getYearMonthDateOfCell(a,b);if(!d)return null;var e=AdfDhtmlChooseDateDOMQueries.getDOMElement(b),e=AdfDhtmlChooseDateDOMQueries.getSelectedDateAndTime(b,e);return new Date(d.yyyy,d.mm,d.dd,e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds())};
AdfDhtmlChooseDateWallCalendarGridPanel._getYearMonthDateOfCell=function(a,b){AdfAssert.assertDomElement(a);AdfAssert.assertPrototype(b,AdfRichChooseDate);var d=AdfAgent.AGENT,e=d.getAttribute(a,AdfDhtmlChooseDatePeer._DAY_ID_ATTR_NAME);if(!e||e==AdfDhtmlChooseDatePeer._BLANK_CELL_ID)return null;var f=AdfDhtmlChooseDateDOMQueries.getDOMElement(b),g=AdfDhtmlChooseDateDOMUtils.getParentTableElement(f,a);AdfAssert.assertDomElement(g);var h=d.getAttribute(g,AdfDhtmlChooseDatePeer._YYYY_MM).split("-");
AdfAssert.assert(2==h.length);g=parseInt(h[0]);h=parseInt(h[1]);d=parseInt(d.getTextContent(a));g=AdfDhtmlChooseDateDOMQueries.isThaiBuddhistCalendar(b,f)?g-AdfDhtmlChooseDatePeer._THAI_BUDDHIST_YEAR_OFFSET:g;e&&(e==AdfDhtmlChooseDatePeer._PREV_MONTH_ID?(h--,0>h&&(h+=12,g--)):e==AdfDhtmlChooseDatePeer._NEXT_MONTH_ID&&(h++,11<h&&(h-=12,g++)));return{yyyy:g,mm:h,dd:d}};
AdfDhtmlChooseDateWallCalendarGridPanel._dateCellSelector=function(a,b){AdfAssert.assertDomElement(a);AdfAssert.assertObject(b);var d=b.lookup,e=AdfDhtmlChooseDateWallCalendarGridPanel._getYearMonthDateOfCell(a,b.component);if(!e)return!1;e=new Date(e.yyyy,e.mm,e.dd);return d[e]?(AdfDomUtils.addCSSClassName(a,AdfDhtmlChooseDatePeer._SEL_DAY_CLASS),b.selectedDateToCellMap[e]=a,!0):!1};
AdfDhtmlChooseDateWallCalendarGridPanel._convertDateListToDateMap=function(a){AdfAssert.assertArray(a);for(var b={},d=0;d<a.length;d++)b[AdfDhtmlChooseDateDOMQueries.resetTime(new Date(a[d]),!1)]=!0;return b};
AdfDhtmlChooseDateWallCalendarGridPanel._handleArrowKeyNavigation=function(a,b){var d=AdfDhtmlChooseDateWallCalendarGridPanel,e=a.getNativeEvent(),e=AdfAgent.AGENT.getKeyCode(e),f=a.getSource(),g=a.getNativeEventTarget(),h=AdfPage.PAGE.getLocaleContext().isRightToLeft(),k=null;switch(e){case AdfKeyStroke.ARROWUP_KEY:case AdfKeyStroke.ARROWDOWN_KEY:k=d._handleVerticalNavigation(e,g);break;case AdfKeyStroke.ARROWRIGHT_KEY:k=h?d._handleLeftNavigation(g,f):d._handleRightNavigation(g,f);break;case AdfKeyStroke.ARROWLEFT_KEY:k=
h?d._handleRightNavigation(g,f):d._handleLeftNavigation(g,f)}return d._focusDateCell(g,k,b)};AdfDhtmlChooseDateWallCalendarGridPanel._handleVerticalNavigation=function(a,b){var d=a==AdfKeyStroke.ARROWUP_KEY?AdfDomUtils.getPreviousElement(b.parentNode):AdfDomUtils.getNextElement(b.parentNode);if(d){var e=AdfDomUtils.getElementPosition(b);return AdfDomUtils.getChildElementByPosition(d,b.nodeType,e)}return null};
AdfDhtmlChooseDateWallCalendarGridPanel._handleRightNavigation=function(a,b){var d=AdfDomUtils.getNextElement(a);if(!d&&null!=a.parentNode){var e=AdfDomUtils.getNextElement(a.parentNode);e&&(d=AdfDomUtils.getFirstChildElement(e))}e=AdfAgent.AGENT;if(!d||e.getAttribute(d,AdfDhtmlChooseDatePeer._DAY_ID_ATTR_NAME)==AdfDhtmlChooseDatePeer._BLANK_CELL_ID){var f=AdfDhtmlChooseDateDOMQueries.getDOMElement(b),f=AdfDhtmlChooseDateDOMUtils.getParentTableElement(f,a);AdfAssert.assert(null!=e.getAttribute(f,
AdfDhtmlChooseDatePeer._YYYY_MM));(e=AdfDomUtils.getNextElement(f))&&(d=AdfDomUtils.getFirstChildElementByAttributeValue(e,AdfDhtmlChooseDatePeer._DAY_ID_ATTR_NAME,AdfDhtmlChooseDatePeer._CUR_MONTH_ID,AdfDhtmlChooseDateWallCalendarGridPanel._DATE_CELL_NODE_TYPE))}return d};
AdfDhtmlChooseDateWallCalendarGridPanel._handleLeftNavigation=function(a,b){var d=AdfDomUtils.getPreviousElement(a);if(!d&&null!=a.parentNode){var e=AdfDomUtils.getPreviousElement(a.parentNode);e&&(d=AdfDomUtils.getLastChildElement(e))}e=AdfAgent.AGENT;if(!d||"TH"==e.getNodeName(d)||e.getAttribute(d,AdfDhtmlChooseDatePeer._DAY_ID_ATTR_NAME)==AdfDhtmlChooseDatePeer._BLANK_CELL_ID){var f=AdfDhtmlChooseDateDOMQueries.getDOMElement(b),f=AdfDhtmlChooseDateDOMUtils.getParentTableElement(f,a);AdfAssert.assert(null!=
e.getAttribute(f,AdfDhtmlChooseDatePeer._YYYY_MM));(e=AdfDomUtils.getPreviousElement(f))&&(d=AdfDomUtils.getLastChildElementByAttributeValue(e,AdfDhtmlChooseDatePeer._DAY_ID_ATTR_NAME,AdfDhtmlChooseDatePeer._CUR_MONTH_ID,AdfDhtmlChooseDateWallCalendarGridPanel._DATE_CELL_NODE_TYPE))}return d};
AdfDhtmlChooseDateWallCalendarGridPanel._focusDateCell=function(a,b,d){if(b&&AdfDomUtils.isAncestor(d,b)){d=AdfAgent.AGENT.getAttribute(b,AdfDhtmlChooseDatePeer._DAY_ID_ATTR_NAME);if(!d||d==AdfDhtmlChooseDatePeer._BLANK_CELL_ID)return!0;a&&a.setAttribute("tabIndex","-1");b.setAttribute("tabIndex","0");AdfFocusUtils.focusElement(b);return!0}return!1};
AdfDhtmlChooseDateWallCalendarGridPanel.prototype._buildCalendarGrids=function(a,b,d,e){e||AdfDhtmlChooseDateDOMUtils.removeAllChildren(d);e=AdfDhtmlChooseDateDOMQueries.getMonthDisplayRange(a);b=e.months;e=e.start;for(var f=-1*(Math.ceil(b/2)-1),g=0;g<b;g++){var h=AdfDhtmlChooseDatePeer._CAL_GRID_ID+(0==f?"":f),h=AdfRichUIPeer.CreateSubId(a.getClientId(),h),h=this._buildWallCalendarForMonth(a,e.getMonth(),e.getFullYear(),h);d.appendChild(h);e.setMonth(e.getMonth()+1);f++}};
AdfDhtmlChooseDateWallCalendarGridPanel.prototype._buildWallCalendarForMonth=function(a,b,d,e){var f=AdfDhtmlChooseDateWallCalendarGridPanel,g=AdfDhtmlChooseDateDOMQueries.getDOMElement(a),h=AdfDhtmlChooseDateDOMQueries.getLocaleSymbols(a,g),k=h.getMonths().slice(0,12)[b]+" "+(d+(AdfDhtmlChooseDateDOMQueries.isThaiBuddhistCalendar(a,g)?AdfDhtmlChooseDatePeer._THAI_BUDDHIST_YEAR_OFFSET:0)),l=AdfPage.PAGE.getLookAndFeel().getStyleClass("af|chooseDate::calendar-grid"),m=AdfDhtmlChooseDateDOMQueries.getRenderedMonthAndYear(a,
g),g=AdfDhtmlChooseDateDOMQueries.getMonthsToDisplay(a,g);d==m.getFullYear()&&b==m.getMonth()&&1<g&&(l+=" "+AdfDhtmlChooseDatePeer._SHOW_MONTH_STYLE_CLASS);e=AdfDhtmlChooseDateDOMUtils.createElementWithAttributes("table",{id:e,"data-afr-yyyymm":d+"-"+b,"class":l,role:"grid",cellpadding:"0",cellspacing:"0",border:"0",width:"100%","aria-label":k});k=AdfDhtmlChooseDateDOMUtils.createAndAppendElement("tbody",{},e);l=this.GetWeekDayTypeProperty();k.appendChild(f._buildWallCalendarGridHeader(a,h,l));f._buildWallCalendarDateGrid(a,
k,b,d);return e};AdfDhtmlChooseDateWallCalendarGridPanel.prototype.GetWeekDayTypeProperty=function(){return"ShortWeekdays"};AdfDhtmlChooseDateWallCalendarGridPanel._buildWallCalendarGridHeader=function(a,b,d){var e=AdfDhtmlChooseDateDOMUtils.createElementWithAttributes("tr",{role:"row","class":AdfPage.PAGE.getLookAndFeel().getStyleClass("af|chooseDate::week-header-row")});AdfDhtmlChooseDateWallCalendarGridPanel._fillWallCalendarGridWeekLabels(a,e,b,d);return e};
AdfDhtmlChooseDateWallCalendarGridPanel._fillWallCalendarGridWeekLabels=function(a,b,d,e){var f=AdfDhtmlChooseDateWallCalendarGridPanel,g=AdfDhtmlChooseDateDOMQueries.getDOMElement(a);a=AdfDhtmlChooseDateDOMQueries.getFirstDayOfTheWeek(a,g);for(var g=AdfPage.PAGE.getLookAndFeel(),h=0;7>h;h++){var k=f._buildWeekLabelCell((a+h)%7,g,d,e);b.appendChild(k)}};
AdfDhtmlChooseDateWallCalendarGridPanel._buildWeekLabelCell=function(a,b,d,e){b=AdfDhtmlChooseDateDOMUtils.createElementWithAttributes("th",{"class":b.getStyleClass("af|chooseDate::week-header-cell"),role:"columnheader",scope:"col","aria-label":d.getWeekdays()[a]});b.textContent=d["get"+e]()[a];return b};
AdfDhtmlChooseDateWallCalendarGridPanel._buildWallCalendarDateGrid=function(a,b,d,e){var f=AdfDhtmlChooseDateDOMQueries.getDOMElement(a),g=AdfPage.PAGE.getLookAndFeel(),h=AdfDhtmlChooseDateDOMQueries.getSelectedDateAndTime(a,f),k=(new Date(e,d,1)).getDay(),l=AdfDhtmlChooseDateDOMQueries.getFirstDayOfTheWeek(a,f),l=(k-l+7)%7,k=32-(new Date(e,d,32)).getDate(),k=Math.ceil((l+k)/7),l=new Date(e,d,1-l,0,0,0,0),m=new Date(e,d,1,0,0,0,0),n=l.getDate(),q=l.getMonth();h.getFullYear()==e&&h.getMonth()==d?(n=
h.getDate(),q=h.getMonth()):1<AdfDhtmlChooseDateDOMQueries.getMonthsToDisplay(a,f)&&(e=AdfDhtmlChooseDateDOMQueries.getMonthDisplayRange(a),n=e.end,h<e.start||h>n?(n=1,q=d):q=n=-1);for(d=0;d<k;d++)e=g.getStyleClass("af|chooseDate::days-row"),e+=0==d?" p_AFFirst":"",e+=d==k-1?" p_AFLast":"",b.appendChild(AdfDhtmlChooseDateWallCalendarGridPanel._buildCalendarGridRow(a,g,f,e,l,m,n,q,h))};
AdfDhtmlChooseDateWallCalendarGridPanel._buildCalendarGridRow=function(a,b,d,e,f,g,h,k,l){e=AdfDhtmlChooseDateDOMUtils.createElementWithAttributes("tr",{role:"row","class":e});for(var m=0;7>m;m++)e.appendChild(AdfDhtmlChooseDateWallCalendarGridPanel._buildCalendarGridDateCell(a,b,d,f,g,h,k,l)),f.setDate(f.getDate()+1);return e};
AdfDhtmlChooseDateWallCalendarGridPanel._buildCalendarGridDateCell=function(a,b,d,e,f,g,h,k){var l=AdfDhtmlChooseDateDOMQueries.getTodayDate(a,d),m=AdfDhtmlChooseDateDOMQueries.isDateDisabled(a,e);b=AdfDhtmlChooseDateWallCalendarGridPanel._getDayCellStyling(a,b,e,f,l,k,m);g=AdfDhtmlChooseDateDOMUtils.createElementWithAttributes(AdfDhtmlChooseDateWallCalendarGridPanel._DATE_CELL_NODE_TYPE,{role:"gridcell","aria-disabled":m?!0:void 0,tabindex:e.getDate()==g&&e.getMonth()==h?0:-1,"class":b});h=e.getMonth()==
f.getMonth()&&e.getFullYear()==f.getFullYear();a=1==AdfDhtmlChooseDateDOMQueries.getMonthsToDisplay(a,d);h&&g.setAttribute(AdfDhtmlChooseDatePeer._DAY_ID_ATTR_NAME,AdfDhtmlChooseDatePeer._CUR_MONTH_ID);h||a?(a=new Date(f),a.setMonth(a.getMonth()-1),f=new Date(f),f.setMonth(f.getMonth()+1),e.getMonth()==a.getMonth()&&e.getFullYear()==a.getFullYear()?g.setAttribute(AdfDhtmlChooseDatePeer._DAY_ID_ATTR_NAME,AdfDhtmlChooseDatePeer._PREV_MONTH_ID):e.getMonth()==f.getMonth()&&e.getFullYear()==f.getFullYear()&&
g.setAttribute(AdfDhtmlChooseDatePeer._DAY_ID_ATTR_NAME,AdfDhtmlChooseDatePeer._NEXT_MONTH_ID),g.textContent=e.getDate()):g.setAttribute(AdfDhtmlChooseDatePeer._DAY_ID_ATTR_NAME,AdfDhtmlChooseDatePeer._BLANK_CELL_ID);return g};
AdfDhtmlChooseDateWallCalendarGridPanel._getDayCellStyling=function(a,b,d,e,f,g,h){var k="",l=AdfDhtmlChooseDateDOMQueries.getDOMElement(a),m=d.getMonth()==e.getMonth()&&d.getFullYear()==e.getFullYear();a=1==AdfDhtmlChooseDateDOMQueries.getMonthsToDisplay(a,l);m||a?(d.getFullYear()==f.getFullYear()&&d.getMonth()==f.getMonth()&&d.getDate()==f.getDate()?k=b.getStyleClass("af|chooseDate::today"):(f=new Date(e),f.setMonth(f.getMonth()-1),m=new Date(e),m.setMonth(m.getMonth()+1),d.getMonth()==e.getMonth()&&
d.getFullYear()==e.getFullYear()?k=b.getStyleClass("af|chooseDate::regular-day"):d.getMonth()==f.getMonth()&&d.getFullYear()==f.getFullYear()?k=b.getStyleClass("af|chooseDate::prev-month-day"):d.getMonth()==m.getMonth()&&d.getFullYear()==m.getFullYear()&&(k=b.getStyleClass("af|chooseDate::next-month-day"))),h?k+=" "+AdfDhtmlChooseDatePeer._DISABLED_STYLE_CLASS:g&&d.getMonth()==g.getMonth()&&d.getDate()==g.getDate()&&(k+=" "+AdfDhtmlChooseDatePeer._SEL_DAY_CLASS)):k=b.getStyleClass("af|chooseDate::empty-day-stub");
return k};AdfDhtmlChooseDateWallCalendarGridPanel._DATE_CELL_NODE_TYPE="TD";