Alpha date format mapping issue

I set the date format to dd-mm-yyyy, but it is mentioned that it only accepts the date in ISO format.

So, I changed the date format in the onDateSelect event and updated it in the co object. However, the selected date field doesn’t display correctly because the format is not in ISO.

But I need to store the value in dd-mm-yyyy format.
One way to do this is by storing the value in a local variable during onInit, converting the format there, and then updating the format again in the onDateSelect event before setting it in the co object.

Is there any other way to handle this in Alpha?

4 Likes

Best Practice: Storing Dates in ISO Format

Storing dates in non-ISO formats is not recommended. Always store date data in the ISO standard format. Formatting should be done only when:

  • Sending data to external services that require specific date formats.
  • Presenting dates to users in the frontend.

Why ISO?

  • Retains the actual value without data loss.
  • Simplifies parsing and processing across services.

Remember:
Formatting is for presentation; storage should preserve real date values.

3 Likes