on 04-24-2015 4:46 PM
Hi Gurus,
I am currently making changes to some of our existing forms so that the dates and quantities will format properly based on the locale. I am passing in the local to the form and using this to set the format. Everything works fine except for the US dates, which is getting formatted as Jan 21, 2015 instead of 01/21/2015. Because of space constraints I need to use the "shortened" version. I currently have the field set as type Date/Time and nothing listed under Patterns. I tried using date.short{} in the pattern field, but ended up with 01/21/15. Date.medium{} and date.default{} gave me the Jan 21, 2015. Does anyone know if there is a way to get the full 4 digit year?
Thanks!
Julie
Hello Julie
You can create the following pattern
date(en_US) {MM/DD/YYYY}
A default date value must conform to the short format for the locale specified for the date field. However, by default, Designer displays the default value in the medium locale format at both design time and run time.
For example, consider a form with a Date/Time Field set to use the German (Germany) locale. You enter the default value for a date in the short format DD.MM.YY. After you change the focus to another field, the value specified in the field on the page is displayed in the medium format DD.MM.YYYY. The formatted value also appears in the medium format if you view the form in the Preview PDF tab.
Adobe LiveCycle ES3 * Formatting field values and using patterns
regards
sandy
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Sandy,
Thank you for your response. Sorry it took so long to reply. If I'm understanding what you're saying, I should enter in 'date(en_US){MM/DD/YYYY}' in the Display tab of the Patterns button. Is that correct? If so, that works for the en_US locale, however, if the locale passed into the form is de_DE for example, the date fields still display in the US format. I am trying to dynamically set the locale by passing in a parameter to the form and using that value in the Form Ready event. It appears that when a display pattern is set up under the Patterns button, that takes precedence.
Is what I'm trying to do possible?
Thanks!
Julie
Hello Julie,
If you want to support different date format based on dynamic locales, then by default "medium locale format" will be displayed for US - MM/DD/YY. This is as per with Adobe documentation
Adobe LiveCycle ES3 * Formatting field values and using patterns
However, by default, Designer displays the default value in the medium locale format at both design time and run time.
Regards
Sandy
User | Count |
---|---|
90 | |
10 | |
10 | |
10 | |
7 | |
7 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.