Date Time Picker and Internet Explorer 8

Home » Date Time Picker and Internet Explorer 8

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) {

}

3 thoughts on “Date Time Picker and Internet Explorer 8”

Leave a Comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Scroll to Top