Time entry
Posted: Tue Dec 15, 2020 3:02 pm
I am trying to setup 2 time input fields for a mobile access application. Using RPGLE and Rich Display files. I have tried several combinations to get the input fields working, but I have yet to hit a combination that works.
Initially I had the data field set to TIME type and on the RDF I had the input type set as "time" so that it would pop up the mobile browser's time interface and that works well. But I would occasionally get "time not valid format" errors when attempting to submit the screen. And under other circumstances it would input fine, but would not display the time if it was already set.
So I decided to try using a decimal field (I have used 6,0 and 4,0) for the field and the input type set to "time". This setup comes the closest to working as I would expect it to. I am able to input the time and it is not giving me any errors. But if a time exists in the field and it is under 10:00 - it does not display the time. If it is over 10:00 it shows it as expected. I am currently using a 4,0 decimal field, input type set to Time. And in the code I am converting the time field to a 4,0 decimal to output to the screen.
This example shows the time fields and just above them is an output field that is the same that is used for the time field.
Any thoughts on why it is doing this or is there a simpler way to input and display time fields?
Initially I had the data field set to TIME type and on the RDF I had the input type set as "time" so that it would pop up the mobile browser's time interface and that works well. But I would occasionally get "time not valid format" errors when attempting to submit the screen. And under other circumstances it would input fine, but would not display the time if it was already set.
So I decided to try using a decimal field (I have used 6,0 and 4,0) for the field and the input type set to "time". This setup comes the closest to working as I would expect it to. I am able to input the time and it is not giving me any errors. But if a time exists in the field and it is under 10:00 - it does not display the time. If it is over 10:00 it shows it as expected. I am currently using a 4,0 decimal field, input type set to Time. And in the code I am converting the time field to a 4,0 decimal to output to the screen.
This example shows the time fields and just above them is an output field that is the same that is used for the time field.
Any thoughts on why it is doing this or is there a simpler way to input and display time fields?