Rich Widgets Input Calendar - weird behaviour on mobile

Hi,

I noticed than, when using input calendar on mobile, the date format changes as well as the date picker itself. This is causing issues on my application, because I'm expecting to receive a date in a specific format and, since this changes, the wrong date is being stored.


Steps to reproduce:

1. Go to the Input Calendar sample at https://andrefmota.outsystemscloud.com/RichWidgetsSample/InputCalendar.aspx?(Not.Licensed.For.Production)=


2. You can see that the placeholder for the date input is YYYY-MM-DD.


3. Open the Inspect Element on the browser and toggle the device toolbar - The paceholder for the date is now dd-mm-yyyy (in my case - from what I understood, this will appear in the same date format of our machine) and the datepicker looks different.


Does someone know why this happens and how to fix it?

Thanks in advance,

Ana Santos

Hi Ana,

Here is the so far observation.

When you view the Rich Widget Input Calendar on Web , it's type ='text' & thus it shows the placeholder as YYYY-MM-DD

And when we go for an mobile view, , it's type ='date' & thus it shows the placeholder as dd-mm-yyyy.

You might be changing the type via JS,Can you share the same OML.

Cheers,

Assif

Hi Ana,


Don't worry about this, because you are viewing in the web emulator in the real device it will adopt the os built-in functionalities.

real view 

Please check in a real device and let us know.


Regards,

Pankaj

Pankaj pant wrote:

Hi Ana,


Don't worry about this, because you are viewing in the web emulator in the real device it will adopt the os built-in functionalities.

real view 

Please check in a real device and let us know.


Regards,

Pankaj

Thanks Pankaj,

can you cross check the same url that Ana provided, Coz it's the Web-App.


Hi Assif/Ana,

 given URL is also working as aspected.


Regards,

Pankaj

Pankaj pant wrote:

Hi Assif/Ana,

 given URL is also working as aspected.


Regards,

Pankaj

Thanks Brother Pankaj, Appreciate !!! 



Pankaj pant wrote:

Hi Ana,


Don't worry about this, because you are viewing in the web emulator in the real device it will adopt the os built-in functionalities.

real view 

Please check in a real device and let us know.


Regards,

Pankaj


Hi Pankaj,

Actually this is a problem for me, because I have a requirement that the date should be in format DD-MMM-YYYY (e.g.: 12-AUG-1981). So, when I'm on mobile, the datepicker changes and so does the value on the input - for instance, on iPad I'll get "AUG 10, 1981" which not only does not follow business requirements but will also store the wrong date (because 12-AUG-1981 is a text and I'm converting that text to a Date, so when it tries to convert a different format, it won't work).

Do you know how I can prevent this from happening, so it will always show the date in the format I want to?

As for Assif's answer, the link I provided is not my app, is just an online sample that I found, but I know for sure that in my application I'm not using any JS to change the input type, so I have no ideia why this might be happening.

Thanks.