Skip to Content
Former Member
Jun 26, 2008 at 07:32 AM

Date format problem



we have the following problem. We have an inputField connected to a context attribute with the date type. When you use the datepicker, and when default dates are shown, the date is in the format DD.MM.YYYY (which is the correct format for our locale).

However, the user can also enter a date without using the datepicker. When he/she enters a date in the format DD-MM-YYYY, SAP automatically thinks this is a date in a different locale, and switches the DD values with the MM values. So, in reality, when a user enters the date with '-', SAP turns it into MM.DD.YYYY. How can I make sure that doesn't happen? I only want the user to be able to enter in DD.MM.YYYY, or not enter anything at all, and only use the datepicker.

To give you specific examples: The correct date would be 12.06.2008 (12th of june 2008). When a user enters 12-06-2008 SAP changes the date to 06.12.2008 (6th of december 2008).