Override tapestry5 datefield default format

2018-04-10 Thread abangkis
Hi, is there a quick way to override tapestry datefield default format? In a single datefield i can do But it became very repetitive for many pages. Regards -- http://www.mreunionlabs.net/ twitter : @mreunionlabs @abangkis page : https://plus.google.com/10416

Re: Override tapestry5 datefield default format

2018-04-10 Thread Thiago H. de Paula Figueiredo
Hello! The default format is taken from DateFormat.getDateInstance(DateFormat.SHORT, locale), where locale is got through @Inject. Is your desired date format the one returned by that method for your locale? On Tue, Apr 10, 2018 at 5:26 AM, abangkis wrote: > Hi, is there a quick way to override

Re: Override tapestry5 datefield default format

2018-04-10 Thread abangkis
Hi thiago, Sorry, i'm having a bit of trouble understanding your explanation. Lets say i pick April 10th, 2018 from my date picker in my page. It will fill the field with 04/10/2018. While the format we expected is 10-04-2018. I could override the field and specify the format in the template

Re: Override tapestry5 datefield default format

2018-04-10 Thread Thiago H. de Paula Figueiredo
Hi! Your question was clear. There's no such configuration symbol due to the way way DateField defines which format to use, which is calling DateFormat.getDateInstance(DateFormat.SHORT, locale). A possibility is to create your own DateField class by copying the source from the Tapestry one, custo