XPages iNotes Calendar

断了今生、忘了曾经 提交于 2019-12-12 00:42:07

问题


How do you control the display of the time and dates on the iNotes Calendar control in an XPage? I would like to have the times shown using the 12 hour format hh:mm AM and the date to use MMM dd, yyyy.

Thank you.


回答1:


The date and time format for iNotes Calendar is defined in language files for the most common languages. These language files are specific for iNotes Calendar.

They are stored in com.ibm.xsp.extlib.domino_x.x.x.xxxxxxxx-xxxx.jar file in folder DominoServerPath\data\domino\workspace\applications\eclipse\plugins.

If you unpack the jar file (it's just a zip file) you'll find a folder resources\web\dwa\date\nls and there the language specific subfolders like de, en, en-gb, en-ie and en-us. The date and time format is definied in that subfolders in file calendar.js.

This file starts e.g. for en-us with the lines:

Surprisingly, the date and time format is not right for the US en-us. Same for en, en-gb and en-ie. I'd call it a bug or at least a wrong packaging.

If you change the time format line to D_DTFMT_TIME0: "hh:mmt" then you get your 12 hour time format with am/pm.

Close to setting D_DTFMT_TIME0 are all the other settings for date and time formatting.

So, change all en languages files with the appropriate values, save them back to the jar file and restart the Domino server.

Just for further research: the date and time values get formatted with the help of ...jar\resources\web\dwa\date\dateFormatter.js.



来源:https://stackoverflow.com/questions/18411426/xpages-inotes-calendar

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!