A few weeks ago one of my colleagues was having a problem with the Date Time Picker control in an XPage. You can see an example here. Whenever he clicked the calendar icon, the form refreshed immediately, before a value could be selected. After further investigation, this was happening only on Internet Explorer, but not in the Notes Client or Firefox. I had been working on the dojox charts series, so the immediate thought was to enable compatibility mode in Internet Explorer. I was not too surprised when this resolved the problem.
To make a more robust solution, as with the charts, you can add the following code to the beforePageLoad event of any XPages (or custom controls) where date pickers are required:
try {
if (context.getUserAgent().isIE(8, 8)) {
var exCon = facesContext.getExternalContext();
var response = exCon.getResponse();
response.setHeader(“X-UA-Compatible”, “IE=EmulateIE7”);
}
} catch (e) {
}
Hi Paul,
We’re hoping to address this issue in 852, and that workaround is very helpful in the meantime.
p.
I’ve tried this but it did not work for me. Anything I might have missed? Using version 8.5.3
I’m not aware of anything. That code should override Compatibility Mode in IE8 (it will not work for another version of IE). An alternative is to use the Dojo Date Picker https://www.intec.co.uk/xpages-date-picker-my-preference/