OpenClinica User Manual/PopupCalendar

From Wikibooks, open books for an open world
Jump to navigation Jump to search

Popup calendar gives invalid dates[edit | edit source]

After your installation everything works fine, except the popup calendar for choosing dates. Although you use it you still get an error message saying "Invalid date format" when you try to save the data. The reason for this is probably the regional setting of your server: not English/US.

When Tomcat is installed it takes the regional settings of the server. The main objective is to set the environment variables - user.language - (may be optional) Try one of the following approaches. Both approaches change the environment variables for all applications using this tomcat service.

Windows[edit | edit source]

first approach[edit | edit source]

To correct this, on a Windows server, choose, Programs, Tomcat, Configure. Go to tab Java, and add two lines to Java options:


second approach[edit | edit source]

The following approach works for Windows XP and might be similar on other windows versions:

1. stop your tomcat
2. open a console window (enter 'cmd' into the start menu execute field)
3. go to <tomcat installation directory>\bin
4. execute tomcatw6.exe //ES//
5. add the system variables to your java configuration
6. start your tomcat

Save the new settings and restart Tomcat.

Linux[edit | edit source]

If not exist create new file in /usr/local/tomcat/bin named with this code

JAVA_OPTS="$JAVA_OPTS -Duser.language=en"

If exists, add -Duser.language=en and to JAVA_OPTS in (/usr/local/tomcat/bin)

Restart tomcat

NB: Debian Squeeze users will create the file in /usr/share/tomcat6/bin.