Skip to Content
avatar image
Former Member

InputField with date

Hello

In my InputField with value=date (type) I would like to check input from user and if the format is wrong to display (report) message in language which is chosen in IE (my App works in 2 languages ) in MessageArea control.

I also have button "save" which save the date in the InputField and if it is in wrong format the system automatically correct it ?!

In my function onActionSave format is already corrected by the system and I cannot check format whether it is wrong.

Is there any workaround about this problem ?

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • avatar image
    Former Member
    Dec 14, 2006 at 12:04 PM

    Hi,

    1. Create a simple type in the local dictionary.

    2. Choose the base type as date.

    3. Open the Representation tab and enter the format that you want there. For example: MM-dd-yyyy.

    4. Create a context attribute of type this simple type.

    5. Bind this to your inputfield.

    Now if you enter value in the wrong format and click on the Save button, the WD framework will show the message that the entered format is wrong.

    Regards,

    Satyajit.

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Dec 14, 2006 at 12:22 PM

    Hello

    I tried this. But the message reported from the system is always in English.

    I need to display this message in appropriate language in accordance with one chosen in IE

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi,

      Is your application running in the portal? Then check the language settings of the portal user and/or the iView.

      You can also specify the application variable 'sap-locale' inside your WDP application. (Application properties).

      Good luck,

      Roelof