1 Reply Latest reply on Apr 11, 2007 9:58 AM by Pete Muir

    s:convertDateTime and s:selectDate without specifying patter

    Daniel Young Novice

      Hi all,

      The above 2 tags do not play nicely together if you do not specify a date format pattern.

      s:converDateTime correctly uses the current locale to format the date, which can result in my input box containing say 'dd/mm/yyyy', 'mm/dd/yyyy' or 'dd-mm-yyyy' depending on my locale. This is great.

      However, if no pattern is specified on s:selectDate, it always default the javascript CAL_DATE_FORMAT variable to "MM/dd/yyyy", which results in much confusion in a dd/mm/yyyy locale, eg- the wrong month popping up to what you'd expect, the wrong date getting saved, etc.

      Would it be possible for s:selectDate defaulted to an appropriate format based on the current locale?

      As a workaround in the meantime, we are always going to specify the appropriate format for the current locale using an EL function, but it would be nice if this "just worked".