I am currently using a sap.m.DateTimePicker in one of my projects.
Since I want to limit the input time range, I use the properties *minDate *and maxDate.
My UI5 version is 1.71 (yes I know, not very up-to-date).
Now to my error:
If the sap.m.DateTimePicker is opened for the first time and I change the preselected time but NOT the preselected date, it is possible to go below the minDate after confirming the selection. I have also noticed that this also overwrites the minDate, i.e. the invalid value also becomes the new minDate.
This is probably caused by the following standard method in sap.m.DateTimePicker:
method in the sap.m.DateTimePicker (UI5-version 1.71)
Here the date gets initialised with the minDate, but in JS this means that it is not a copy, but both refer to the same object. The effect of this is that when the date gets confirmed, the minDate will also be changed.
I was able to solve the whole thing as follows:
My solution
Are you aware of this error? Or am I using the sap.m.DateTimePicker incorrectly?
In the current SAPUI5 version, the error still exists ( in my understanding):
method in the sap.m.DateTimePicker (latest UI5-version)