Does Date Picker respect application language datetime format when a user types in partial date ?
0
Dear developpers, I'm working on an app using fr-CH locale settings and language. I want to allow users to type in dates using out-of-the-box Date Picker widget. I have the feeling that this widget does not respect application language settings (i.e datetime format 'dd.MM.yyyy HH:mm'). When a user types in "24.3", he gets an "Invalid date" validation message. When a user types in "3.24", he gets a valid date : 24.03.2001 (2001 is the default mendix year for some reason I don't know). This is precisely what makes me think Mendix is working with default locale (en-US) for partial inputs. Why would that be the standard behaviour ? When a user types in "24.03.2001 00:00", everything works as expected and the date is "24.03.2001 00:00". Subsidiary question : I can't find a good way to set my application default year to current year. It would be great in my case to allow users not to type it. Any idea is welcome.
asked
Matthieu Schmidt
1 answers
0
Hello Matthieu Schmidt,
You can use some latest date time picker widgets from Marketplace which support locale.
Also in your current widgets you can try call a nanoflow on leave event which will parse date time in desired format.
Alternatively you can try custom textbox with mask and datepicker.