3 Replies Latest reply on Jan 30, 2009 10:09 AM by abuit

    HtmlCalendar rendering a newline

      Hello,

      In an earlier topic, I talked about using the HtmlCalendar with a button. This is now working with some workarounds, but I have one issue left.

      I use my own button to open the popup, and it should be right of the input field. I hide the normal image to open the popup using css.

      The HtmlCalendar renders a newline that messes up my layout.

      The DOM structure of the rendered HtmlCalendar looks like this:
      (script tag before myOwnButton is the component control for the button)

      <span id="wrapper">
       <span id="calendarPopup">
       <input id="calendarInputDate"/>
       <img id="calendarPopupButton"/ class="hiddenByMe">
       </span>
       <div id="calendarIFrame" style="display:none;"/>
       <table id="calendar" style="display:none;"/>
       <div id="calendarScript" style="display:none;"/>
       <script />
       <input id="myOwnButton"/>
      </span>



      Between calendar and calendarScript, a newline is rendered. This causes myOwnButton to be set a few pixels away from the input field, in Firefox. IE ignores the newline.

      [...]
      <td class="rich-calendar-toolfooter" style="display: none; background-image: none;"></td></tr></tbody></table></td></tr></tbody></table>[newline]<div style="display: none;" id="pageForm:documentContainer:dttp_control_matrixTab:detailTabPanel:form:detailForm:formBody:test_datetime_date:calendarScript"><script type="text/javascript">//<![CDATA[
      new Calendar('pageForm:documentContainer:dttp_control_matrixTab:detailTabPanel:form:detailForm:formBody:test_datetime_date:calendar', {dayListTableId: 'pageForm:documentContainer:dttp_control_matrixTab:detailTabPanel:form:detailForm:formBody:test_datetime_date:calendarDay',
       weekNumberBarId: 'pageForm:documentContainer:dttp_control_matrixTab:detailTabPanel:form:detailForm:formBody:test_datetime_date:calendarWeekNum',
       weekDayBarId: 'pageForm:documentContainer:dttp_control_matrixTab:detailTabPanel:form:detailForm:formBody:test_datetime_date:calendarWeek [...]
      


      Is this newline really necessary? Is there any way to work around this, or can this be fixed?

      Thanks!