Hi all, the locale.dateformat on server is set to 'dd-MM-yyyy', but I like to override this setting for a client. How can I do it? I only see a 'getDefaultDateFormat', method, but not a 'setDateFormat'.
Regards,
elements.ps_birthday.format = scopes.person.currentDateFormat_dd_mm_yyyy;
Harjo wrote:Even a better idea is to loop over all your forms with solution Model find your datefields, and change them accordingly.
That is very fast, and no worry of doing it in onShow on every form.
jcompagner wrote:problem with the system settings that they are global, they are not client specific (they are in the servoy.properties)
The best thing todo currently is for those fields that need those dateformats, don't depend on the default value but set your value on the field (or columns level) and then use an i1i8n text instead of a direct format string
Then you can add format strings per language/locale
if(scopes.person.currentDateFormat_dd_mm_yyyy)
i18n.setI18NMessage('mykeys.settings.dateformat', scopes.person.currentDateFormat_dd_mm_yyyy);
Return to Programming with Servoy
Users browsing this forum: Manolo_Etec and 13 guests