Let's follow up this discussion at the Neptune Community

(this forum will be kept in read-only mode)

Date formatting after user inputs

Hi,


We have a date picker UI element in our app. Which works perfectly fine when the user selects the drop down calendar to pick up a date. However if they enter date manually then it always takes US date format. 


For example when user types in today's date 12/05/2017 it automatically converts it into US date format and displays the date as Dec 5, 17.


I have set all format option to date:SAPuserdefaults and we want it to automatically take into account user's SAP default. But it always changes back to US date format. 


Any pointers on how to achieve this? I have tried with DateInput field instead of Date picker UI element and its the same issue again. 

1 Comment

Hi Vijay,


Thomas has already replied to you, but just wanted to share the answer with all the community.    These two commands will do the trick:


oDatePicker.setDisplayFormat(<yourFormat>);

oDatePicker.setPlaceholder(<yourFormat>);


Example App:  https://template.neptune-software.com/neptune/sdk/explored_webide?applid=EXP_SAMPLE_DATE_PICKER


Have a nice weekend, kind regards,

Julian

Login or Signup to post a comment