I am experiencing some odd behaviour with the date input in a reactive application.
I am trying to set the date of this input control to 01-01-1900 and store the value in a database. This process works fine and I can read the value back correctly (see image below).
However when I open the form in edit mode the selected date of the input control shows as null (reading dd/mm/yyyy) as can be seen on the image below.
This issue only occurs with this specific date and the process works as expected for any other date including ones before 01-01-1900 (e.g. 01-01-1899). Upon reading other forum posts here, other developers have experienced the same issue with this control and as a built-in component I have no control over it and am unable to resolve the problem myself. I am aware a possible solution can be selecting 02-01-1900 instead but this is technically incorrect and leads to other issues for our clients.
Would it be possible for this to be fixed? This has a further impact on our clients and considering other devs have raised the issue 2 years ago, it is expected that this problem would have been resolved by now.
Hi Hristo Yordanov
During the edit its reading it as null, one thing which you can do is
This is not the proper solution but will work fine as of now.
ThanksShlok Agrawal
Hristo,
1-1-1900 is used by OutSystems as value for a date that represents a NullDate(). Yup, crazy stuff, but search the forum for tons of discussions on the topic. Not going to dive into the reasoning behind it here.
If you really need to store an actual date of 1-1-1900, what you can do is add an extra boolean attribute to your entry like TrueDate1_1_1900 and set it to true when you need to store a date of 1-1-1-1900. You can now use the date attribute together with this boolean attribute to process / display the date correctly.
Regards,
Daniel
Hi Hristo,
I have tried an approach for this,
1. add attribute name as value to the date input
2. and add this TextToDateTime("01-01-01")
3. It will display the date as you expected.
4. You can have this conditionally for that particular date.
Hope this helps!!