Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
230
IgCalendar, Firefox 3 issue and popup location
posted

 Hello Infragistics,

 I'm using Infagistics components in a dynamic JSF application. I encountered two problems when using an HtmlDateChooser. First off, the application I'm working on does not include a scrollbar, everything is rendered in one window without scrollbars, resizing rerenders the page. However, when I open the datechooser popup at the bottom of the application, it is partly rendered outside of the page, causing users not to be able to click certain dates.

I had to make an ugly workaround to relocate it.

function performDatePopupFix(){

var clientHeight        = document.documentElement.clientHeight;
var igCalendar             = document.getElementById('igCalendarPopup');
if(igCalendar != null){
//Relocate if it is outside of the page       
var toploc = parseInt(igCalendar.style.top.substring(0, igCalendar.style.top.indexOf('p')));
if((toploc + 200) > clientHeight){
igCalendar.style.top = (toploc - 200) + 'px';

}}}

 I called this method from ifg_input.js (yes, i know i'm not supposed to modify the contents of this file, but there was no other way), at the end of the IgCalendarPopup.prototype.show function. 

Secondly, the style attributes weren't set properly in Firefox 3. The popup's dom variables like odc, ocssdh, ocssh etc. weren't set, so i had to include a couple of settings in the function i described above:

        igCalendar.setAttribute('odc', 'igCalendar');
        igCalendar.setAttribute('ocssdh', 'igCalendarDayHeader');
        igCalendar.setAttribute('ocssh', 'igCalendarHeader');
        igCalendar.setAttribute('odcCalendarDay', 'igCalendarDay');
        igCalendar.setAttribute('odcncm', 'igCalendarDayNotCurrentMonth');
        igCalendar.setAttribute('ohcCalendarDay', 'igCalendarDayHover');
        igCalendar.setAttribute('oscCalendarDay', 'igCalendarDaySelected');

  and I had to call this.rebuild(); in ifg_input.js after I called performDatePopupFix();

 

These workarounds make everything work fine, but it would be really nice if you could set a property that'd keep the popup inside the screen, and regarding firefox, I can't find out what caused it. The version of Infragistics I'm using is 8.1.20081.2010, according to the comments in the script.

Thank you for your time,

Anne Buit
Thinkwise Software