]
Stephan Bublava commented on JBSEAM-623:
----------------------------------------
The changes had only limited testing and should be reviewed, especially the "first
day of the week" changes (if you want them at all).
<s:selectDate> localization
---------------------------
Key: JBSEAM-623
URL:
http://jira.jboss.com/jira/browse/JBSEAM-623
Project: JBoss Seam
Issue Type: Patch
Components: JSF
Affects Versions: 1.1.0.GA
Reporter: Stephan Bublava
Priority: Minor
Attachments: selectdate-localization-patch.txt
Currently <s:selectDate> is not locale-aware. This affects day names, month names,
buttons as well as the date string written to the text field via JavaScript.
selectdate-localization-patch.txt is a first step to improve this.
Changes include:
- Weekends use a distinct CSS style and can be highlighted if desired. (I've changed
the booking example to demonstrate this).
- The first day of the week is no longer harcoded to Sunday, but calculated according to
the current locale settings (e.g. Monday for German).
- Day and month names are localised as well.
Open issues:
- Weekends are hardcoded to Saturday and Sunday. I have no idea how determine this info
using Calendar, &c. APIs.
- Date formats are not kept in sync between JSF and JavaScript, which always uses
MM/DD/YYYY, regardless of the locale.
- Button names ("close", "this month") are still hardcoded.
- It might be more flexible, to translate day / month names with the application
ResourceBundle instead of using DateFormatSymbols.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: