I'm testing my UI5 application's performance on a slow 3G connection. I've noticed that it takes quite some time to load the sap.ui.unified.Calendar
for the first time when using the sap.m.DateTimePicker
.
This is mentioned in the official documentation. The proposed solution is to preload the sap.ui.unified
library. I have tried multiple ways of doing this but regardless of what I do, the Calendar
still takes long to load the first time.
- I have tried adding
sap.ui.unified
todata-sap-ui-libs
in myindex.html
. - I have tried using
jQuery.sap.require("sap.ui.unified")
(which is apparently deprecated). - I have tried using
sap.ui.require(["sap/ui/unified/Calendar"])
.
None of these solutions work. Any help would be appreciated.
UPDATE
The DateTimePicker
is declared as follows in an XML View:
<DateTimePicker
id="dtClockIn"
valueFormat="MM-dd-YYYY hh:mm a"
displayFormat="MM-dd-YYYY hh:mm a"
placeholder="MM-DD-YYYY hh:mm ampm"/>
There's nothing fancy happening in the controller.