how to change the date format in a datepicker [accepted as enhancement]

This Q&A forum allows users to post and respond to "How Do I Do ....." questions. Please do not use to report (suspected) errors - you must use your regional help desk for this. The information contained in this forum has not been validated by LANSA and, as such, LANSA cannot guarantee the accuracy of the information.
Post Reply
RomainM
Posts: 19
Joined: Wed May 18, 2016 1:37 am
Location: France

how to change the date format in a datepicker [accepted as enhancement]

Post by RomainM »

Hi everybody,

Using Material Design, the datepicker display the selected date using the format « ShortDay, ShortMonth DayNum »
MD.jpg
MD.jpg (19.92 KiB) Viewed 30514 times

In France we do not use this date format, how can we have the date in « ShortDay. DayNum ShortMonth. » format?
Android.jpg
Android.jpg (30.97 KiB) Viewed 30514 times
Best regards,
Romain
Last edited by RomainM on Fri Sep 14, 2018 4:53 pm, edited 1 time in total.
atostaine
Posts: 696
Joined: Wed Jan 20, 2016 7:38 am

Re: how to change the date format in a datepicker?

Post by atostaine »

Just a hunch but is the date format from the Android device system settings?

Art
Art Tostaine
RomainM
Posts: 19
Joined: Wed May 18, 2016 1:37 am
Location: France

Re: how to change the date format in a datepicker?

Post by RomainM »

atostaine wrote: Wed Aug 08, 2018 12:52 am Just a hunch but is the date format from the Android device system settings?

Art
In fact, it is for Windows Web page, I sent an Android screen capture just to show what I want !

Romain.
Theo de Bruin
Posts: 29
Joined: Wed Feb 10, 2016 8:41 pm

Re: how to change the date format in a datepicker?

Post by Theo de Bruin »

Hi,

In your LANSA installation , move to this directory : ....\X_WIN95\X_LANSA\web\vl\lansa_14_2_0_13\locale\
and edit the locale-fr.json file (for French) , change the settings , e,g,

"dateFormat": "dd/MM/yyyy",
"dateLongFormat": "DDD, MMMM D, YYY",
"dateShortFormat": "DDD, MMMM D",
"timeFormat": "HH:mm:ss",
"startOfWeek": "Lundi",

If you run the English version, you will need to change the locale-en.json , etc.
Also make sure your IDE is set to the correct country , language iso code for each language in each partition

Theo de Bruin
LANSA SUPPORT
RomainM
Posts: 19
Joined: Wed May 18, 2016 1:37 am
Location: France

Re: how to change the date format in a datepicker?

Post by RomainM »

Theo de Bruin wrote: Fri Aug 17, 2018 9:21 am
In your LANSA installation , move to this directory : ....\X_WIN95\X_LANSA\web\vl\lansa_14_2_0_13\locale\
and edit the locale-fr.json file (for French) , change the settings , e,g,
Hi Theo,

I do not have the directory ...\vl\lansa_14_2_0_13\ , which EPC do you use ?
I have tried to change the locale-fr.json in the directory \lansa_14_2_1_0\locale but nothing change: i have the same behaviour.

Romain
dominique
Posts: 50
Joined: Mon May 29, 2017 4:16 pm
Location: St. Gallen, Switzerland

Re: how to change the date format in a datepicker?

Post by dominique »

Hi Romain

We had the same problem with sp2. It's not only the locale-fr.json which has an influence to the date.
Please check for French the lpcmnfra.bnd in the X_Lansa/execute Directory
LPCMNFRA.jpg
LPCMNFRA.jpg (211.43 KiB) Viewed 30228 times

Dominique
RomainM
Posts: 19
Joined: Wed May 18, 2016 1:37 am
Location: France

Re: how to change the date format in a datepicker?

Post by RomainM »

Thanks Dominique but that's OK, the file is OK on VL.

Romain
RomainM
Posts: 19
Joined: Wed May 18, 2016 1:37 am
Location: France

Re: how to change the date format in a datepicker?

Post by RomainM »

RomainM wrote: Fri Aug 24, 2018 5:29 pm that's OK, the file is OK on VL.
This not solves my issue, do you think I need to made an enhancement request?
dannyoorburg
Posts: 177
Joined: Mon Jan 04, 2016 9:50 am
Location: Australia

Re: how to change the date format in a datepicker?

Post by dannyoorburg »

Hi,

The format should indeed come from the locale file, exactly like Theo said

If you're running in the FRA language, make sure your Partition has 'fr' as the ISO language code for the FRA language. This is how the web page knows which locale file to use.

If the ISO language code is empty, fill it in. Note that the web page won't know about it until it is recompiled, as the language to ISO mapping gets put into the generated HTML.

If you can't get it working, yes, why wouldn't you contact support, thats what they're there for....

Danny.
RomainM
Posts: 19
Joined: Wed May 18, 2016 1:37 am
Location: France

Re: how to change the date format in a datepicker [accepted as enhancement]

Post by RomainM »

I have asked to the support who has confirmed that it is hardcoded so It has been accepted and logged as an enhancement.

Romain
Post Reply