on 12-02-2004 10:45 PM
Anyone know a good way to validate date and time that a user is entering on the screen. Our users want to enter AM and PM time vs. Military time.
Also, since Input fields don't have an "onBlur" command, what are other companies using in java script.
Hi Anthony,
try these two function modules:
CONVERT_TIME_INPUT
CONVERT_DATE_TO_INTERNAL
Check results depend on time zone system settings or user settings in su01
regards, Ulli
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Good to know the issue is across the baord. We are currently using both those function modules but unfortunately you can only trap what they enter and then display an error message.
So, anyone know how to give an input field a dropdown that calls an SAP function module? DD_SHLP_CALL_FROM_DYNP
What type of DATE/TIME validation are you looking for?
If you want to validate the format you could simply set the type to date/time and enable the dovalidate attribute to "TRUE".
for getting onBlur, onChange, etc for your input field you can use bsp:findandreplace.
<%
tmp_string =`<input onBlur="javascript:yourjsfunction();"`.
%>
<bsp:findAndReplace find = "<input"
replace = "<%= tmp_string %>" >
<htmlb:inputField id = "myInputField2"
value = "12345"
alignment = "left" />
</bsp:findAndReplace>
(courtesy Ulli Hoffmann)
Hope this helps.
Regards
Raja
We had a similiar problem.
We read the inputfield as a string and simply used string manipulation to alter the time format. We knew there was a : and AM or PM or am or PM so we just played around, we eventually changed it to force military time format due to type errors and people using a mix of time formats.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
90 | |
10 | |
10 | |
10 | |
7 | |
7 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.