Validation errors even with Validation=(none)

Validation errors even with Validation=(none)

  

iPhone is using its standard datetime picker for my input_calendar widget. That is great, however, iOS gives back this unacceptable datatime format, so I assign another variable (crdate in attached screenshot) with a correct format (yyyy-mm-dd hh:mm) that outsystems can send to the database in the save action. However, when I click the submit button, I keep getting an "Enter a valid value" error message on the original input_calendar field (below it in the screenshot) which keeps returning to the iOS format. I have turned off validation and also tried giving the input_calendar variable a different validation parent. Whatever I try, I am not able to submit as I keep getting the automatic validation error message on the original input_calendar variable.

Any suggestions how to resolve? Thanks!

Hi Denis,

I think the "Enter a valid value" is displayed by iOS, right? This means you're supplying it with something that iOS doesn't understand. What "unacceptable datetime format" is iOS returning? What kind of variable do you use for the input field, a DateTime or a Text?

Thanks for replying!

Yes, I now found out that iOS indeed displays the "Enter a valid value". But why the error? 

I am using a standard input_calendar widget and  the iPhone comes up with its standard date time picker (which is good). But after picking a date/time and clicking the save button, the input as created by the picker (e.g. Jul 1, 2017, 7:51 AM) does not get validated by the browser. I am using a DateTime variable to store the input, but I am getting the same validation error "Enter a valid value" when I use a text variable instead.

By the way, this is the html for the input field sent to the iPhone: 

<input name="LisbonTheme_wt22$block$wtMainContent$wtDrugDateTime" type="datetime-local" maxlength="20" id="LisbonTheme_wt22_block_wtMainContent_wtDrugDateTime" tabindex="30" class="ThemeGrid_Width8 ThemeGrid_MarginGutter Mandatory SmartInput SmartInput_Changed ReadOnly" onkeydown="null" placeholder="YYYY-MM-DD HH:mm:SS" autocorrect="off" spellcheck="false" origvalue="">

Hi Denis,

The only reason I can think of that iOS gives that error is when the platform fills a value in the input box that iOS can't digest.

The problem is that the iOS native datetime picker fills the value, which then does not pass its own validation! A really serious problem, it means one cannot develop a web app for iOS that uses native date time picker? Unless you know of another way to accomplish this? Is there a way to disable the client validation by the browser?

Thanks for your assistance.

Hi Denis,

Have you tried to create a plain vanilla testing app, with just a single date-type input and see what happens? We have apps on iOS that work fine, so there is likely something wrong with your code somewhere.

Thanks Kilian,

I have created the most "plain vanilla" webscreen, platform does not set anything, just a plain input_calendar widget with a "datetime" input field and a submit button. Same problem as before, see attachment for screen shot and "inspected" input field.

You may want to try it yourself. Getting datetime input from an iOS device (10.3.2, most recent version) using the input_calendar widget in a web app will not pass browser validation and will not work as far as I can determine. This seems a pretty serious problem to me, also for other developers, even as the culprit seems to be iOS?

Hi Denis,

Thanks for the detailed input. I'll try to poke the OutSystems team to take a look at it.

Hey Denis!

Could you please provide the OML of the vanilla webscreen that you prepared and share it with us so we can see if it happens on our end?


This is the .oml of a plain vanilla webscreen I used. But IMHO, your support team may try any form with an input_calendar widget and a datetime input variable: a datetime selected by iOS native datetimepicker will not get passed iOS' submit validation, at least starting at version 10.3.2. of iOS. Of course, I could be proven wrong here, I have been spending too many days on this issue, maybe I missed something?

Just a small thing Denis, you seem to be using a customized theme, can you pass it to me as well? 

I assume this is what you needed Rita?

Hey Denis, 

So I've tried replicating this on my end, I couldn't quite get your app working on my side but I copied the homepage code to a new application with an untouched silk template and I didn't get any verification issue.

Can you try on your side and say what happens when you add the input/calendar to a new app? If the error persists?

Hi Rita,

Thanks for your help.

I did not get the validation error in that case, however, only when not setting the datetime initially, which is not a solution as the iOS datetimepicker does not let you pick a year, so you cannot select a date close to today (only around 1900). Did you try to set an initial value for the datetime variable (e.g. CurDateTime()) in the preparation? I am still getting the error for whatever datetime I set.

Hi Rita,

This still is an issue, any updates? I am also getting the issue with a mobile app. I noticed that others in the community are having the same issue. Simply impossible to pick a date/time on the iphone.

I would think this has the same cause as your other topic, Denis. Pretty annoying it is too.

Hey Denis, I'm sorry for taking so long to get back to you.

I'd ask you to submit feedback using the service studio tool with the oml, since we're not being able to reproduce it on our side.

Thanks for the feedback and sorry for the inconvenience!