<-- Back

Inconsistency in parsing of custom DateTime input with Date Picker - Mendix Runtime vs Client

Issue

The Mendix runtime and the client (UI/frontend) parse DateTime inputs differently, which leads to inconsistencies. For example, when a custom DateTime format is configured to be dd/MM/yyyy, but the input from a Date Picker is dd/MM/yy, then the runtime and the client will parse the year part differently:

  • Runtime: 03/04/68 will be interpreted as 03/04/1968
  • Client: 03/04/68 will be interpreted as 03/04/2068

Environment

Studio Pro (all versions)

Cause

The reason for the discrepancy is that the Mendix runtime follows a Java specification, whereas the Date Picker (client) follows a JavaScript library specification when interpreting DateTime.

Solution / Workaround

To ensure consistency, the application should contain logic to account for these differences by using Validation Rules, for example.

Internal information related

  • 225990
  • CJZ85RLTA/p1724169757756829

Additional information

Mendix documentation:

Other documentation:

 

Have more questions? Submit a request

0 Comments

Article is closed for comments.

To provide feedback, please open a ticket here. Don't forget to include the article's URL along with the feedback you would like to provide.