Author |
Message |
![[Post New]](/templates/default/images/icon_minipost_new.gif) 05/12/2009 13:38:27
|
sarat adiraj
Joined: 27/11/2009 02:11:24
Messages: 3
Offline
|
Hi, I'm a newbie and have recently built a project based on mentawai.I have noticed that the inputDate tag shows the calendar popup in a different locale.How do I fix this? Let me know if you need more info.
Thanks
|
|
 |
![[Post New]](/templates/default/images/icon_minipost_new.gif) 08/12/2009 05:03:58
|
IceW0lf
![[Avatar]](/images/avatar/7cbbc409ec990f19c78c75bd1e06f215.jpg)
Joined: 16/03/2006 08:33:38
Messages: 1546
Location: Brasília
Offline
|
Sarat,
Use this temporary solution, I'll be implementing this solution for the future inputDate.
In your action / application / filters / whatever use this:
Code:
Locale locale = new Locale("YOUR_LOCALE");
SimpleDateFormat myPattern = new SimpleDateFormat("dd/MM/yyyy", locale);
//Set a variable whatever in your output
output.setValue("myStringFormatDate", myPattern.toPattern());
On JSP use like this.
Code:
<c:set var="myFormatDate"><mtw:i18n key="myStringFormatDate"/></c:set>
<mtw:inputDate name="myDate" id="myDate" size="10" textAlign="right" dateFormat="${myFormatDate}"/>
|
Leiber Wallace
Voixy ::: Soluções em Telecomunicações |
|
 |
![[Post New]](/templates/default/images/icon_minipost_new.gif) 13/12/2009 12:55:14
|
Lobo
![[Avatar]](/images/avatar/093f65e080a295f8076b1c5722a46aa2.jpg)
Joined: 23/01/2006 02:17:14
Messages: 840
Location: Fortaleza-CE
Offline
|
hi sarat adiraj,
checkout the code from svn
http://www.mentaframework.org/code.jsp
now the inputDateConfig has a new attribute "lang"
the languages supported are en, br and es
Code:
<mtw:inputDateConfig lang="br" />
<mtw:inputDateConfig lang="en" />
<mtw:inputDateConfig lang="es" />
|
Atenciosamente,
Hélio Frota
Helio Frota
10+ Java Programmer
heliofrota.com
Mentawai Developer |
|
 |
![[Post New]](/templates/default/images/icon_minipost_new.gif) 31/12/2009 19:38:27
|
sarat adiraj
Joined: 27/11/2009 02:11:24
Messages: 3
Offline
|
Thanks guys, the locale support is working. Metawai rocks !!
|
|
 |
![[Post New]](/templates/default/images/icon_minipost_new.gif) 14/12/2011 07:10:20
|
johnylon
Joined: 14/12/2011 05:41:41
Messages: 1
Offline
|
sarat adiraj wrote:
Hi, I'm a newbie and have recently built a project based on mentawai.I have noticed that the inputDate tag shows the calendar popup in a different locale.How do I fix this? Let me know if you need more info.
Thanks
This might be done by just changing your inputDate tag to the location you want to set.
|
|
 |
![[Post New]](/templates/default/images/icon_minipost_new.gif) 28/12/2011 03:55:54
|
lolyny
Joined: 28/12/2011 01:56:18
Messages: 1
Offline
|
You may try after changing your input data to the exact location where you want to set it.
Attempt this first and if you have any problem after this then you can contact me here.
|
|
 |
|