on 11-04-2014 2:29 PM
Hello,
i'm using a sap.ui.commons datepicker. I need to make sure, that the user enters a valid date. Afterwards i create a timestamp using the entered date.
The function getYyyymmdd() returns the last valid date when entering wrong values like "abcd" into the textfield. I need to find a way to tell the user to input valid dates only. I cannot use getValue() as this simply returns the string "abcd", but i have to check this against the locale settings of the user.
Is there a way to check against the locale settings? Does the DatePicker have a function/event to do this automatically?
Thanks.
Best regards
Alexander
Hi,
Use the change event and validate the date. check this thread for reference: http://scn.sap.com/message/15432225#15432225
hope this helps,
Regards,
Kiran
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
new sap.ui.commons.DatePicker({change:function(oEvent){
if(oEvent.getParameter("invalidValue")){
alert("Invalid value");
};
}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.