PDA

View Full Version : [CLOSED] Delphi TwebBrowser error formating datetime gridpanel when using format



jstifel
Nov 11, 2013, 9:22 PM
I have an application written in Delphi using TWebBrowser that allow users to log into a web site written using ext.net.
When I run a page that displays date information withing a GridPanel using a dateColumn and format="dd-MM-yyyy" I get weird info displayed, like NaN/NaN/0NaN.
If I run then some page using IE 10 installed on same machine data comes out formatted well.

Can you give me a hint if possible?

Baidaly
Nov 12, 2013, 12:13 AM
Hello!

Can you provide the code of this Login Window and what version of IE is installed by default on the machine where it doesn't work?

Probably, it happens due to old IE version or compatibility mode of IE because TWebBrowser uses the installed version of IE.

jstifel
Nov 12, 2013, 1:40 PM
It seems the TWebBrowser object always starts in IE7 compatibility mode. Making some changes to registry for IE8 and above compatible mode fix the problem. I have just modified my Delphi application to do so when loaded. Everything works fine now.

You can also set compatibility mode on server side by setting the X-UA-Compatible meta tag.

You can close the thread now.

Thank you very much.