12-18-2020, 10:27 AM
(12-17-2020, 06:59 PM)kudzu Wrote: To be clear are you asking how the controls in the browser use the user of the browsers date settings? They use JS which like Delphi will use the user settings of that browser unless overridden. But passing that "format" from the browser to the server requires some translation.
This is why I said its easier to translate the input using JS into a fixed format for the server to consume rather than trying to handle whatever format the browser uses on the server side.
Ok, I found a solution and a simple one and maybe I can help someone that have been the same problem.
The TIWBSInput has a property AsDateTime. So, rather then doing IWBSInput.Text := DateToStr(Date) to load some date, I do:
IWBSInput.AsDateTime := Date;
and after this for initializing the input field to empty date, I do
IWBSInput.Text := '';
This way and for all the time that I need to load a date type into the input field, I will no longer have the invalid date error. That simple. No matther what are the date format of the server where the Intraweb application is running and the date format of the client, no error what so ever.
Thanks for youi help. It's Delphi, by the way.

