We hope you'll join us for our 4/23 webinar on using data tables to apply reference ranges and AE codes in OC4. For more information and to register, visit https://register.gotowebinar.com/register/2882170018956684555

OC 3.0 date validation errors + multi language calendar

haenselhaensel Posts: 602 ✭✭✭
Hi all
Unfortunately, the calendar plugin/script in OC is always in English, no matter what language the user chooses. Therefore, the date inserted into the edit fields is always in English to (e.g. 19-Oct-2009). Submitting the form, results in a validation error[1] if the users preferred language (for the browser) is something different.
You can overcome this problem, if you change the date to the required language (e.g. 19-Okt-2009 in my case).
If the calender sets the date correctly (if possible), this will be a more userfriendly solution. The last jscalender release (version 1.7) contains translations for
- cn: Chinese
-cz: Czech
-de: German
- es: Spanish
- fr: Frensh
- it: Italien
- jp: Japanese
- pl: Polish
- pt: Portuguese
- ro: Romanian
- ru: Russian
There are a lot more translations for the old(version 1.0) jscalendar[2] . Maybe, these work for the new release too.
I did the following steps, to enable the calendar i18n functionality. I GIVE NO GUARANTEE THAT THE FOLLOWING STEPS DOESN'T DAMAGE YOUR DATA . DON'T TRY THIS WITH YOUR PRODUCTIVE ENVIRONMENT.
1. create a new property key.
1.1 go to /src/main/java/org/akaza/openclinica/i18n
1.2 open all format*.properties files and insert "jscalendar_language_file = calendar-.js" to the end of the file (without the quotation marks).
e.g.
- format.properties: jscalendar_language_file = calendar-en.js
- format_en.properties: jscalendar_language_file = calendar-en.js
- format_de.properties: jscalendar_language_file = calendar-de.js
2. change the JSPs
2.1 open all *.jsp listed below and replace 'calendar-en.js' by ''
e.g.
original:
new: ">
= /src/main/webapp/WEB-INF/jsp
- managestudy-header.jsp (/include/)
- admin-header.jsp (/include/)
- extract-refresh-header.jsp (/include/)
- home-header.jsp (/include/)
- managestudy_top_pages.jsp (/include/
- managestudy-header.jsp (/include/))
- managestudy-head-prev.jsp (/include/)
- submit-header-inactive.jsp (/include/)
- submit-header.jsp (/include/)
- tech-admin-header.jsp (/include/)
- login-header.jsp (/login-include/)
- managestudy_body.jsp (/managestudy/)
- viewSectionDataEntry.jsp (/managestudy/)
- administrativeEditing.jsp (/submit/)
- doubleDataEntry.jsp (/submit/)
- initialDataEntryNw.jsp (/submit/)
- interviewerEntirePage.jsp (/submit/)
- decorator.jsp (/)
3. copy the required jscalendar language files
3.1 download the latest jscalender [3]
3.2 extract the archive and copy the required language files
from: JSCal2-1.7/src/js/lang/
to: /src/main/webapp/includes/new_cal/lang/
4. restart your application server (e.g. Tomcat)
Good luck
Regards,
Christian
[1] 'The input you provided is not a valid date in ..." (property key 'input_not_valid_date')
[2] http://www.dynarch.com/projects/calendar/old/
[3] http://www.dynarch.com/projects/calendar/download/
This discussion has been closed.