UiViewUsageAndEvents startDate endDate


#1

In an UiViewUsageAndEvents component I would like to have that in the calendar the startDate and endDate when the page is loaded are startDate = currentDate -12 hours and endDate = currentDate -6 hours - then they will be both overwritten if the user select a new date range from the calendar - how can I achieve this?


#2

Looking at UIViewUsageAndEvents, the dates fields startDate/endDate accept strings like "2013-05-14T07:00:00.000Z" or a configuration.

Try this:

        "startDate": {
            "referenceConfig": [
                "",
                "current date"
            ],
            "direction": "before",
            "number": 12,
            "unit": "hour"
        },
        "endDate": {
            "referenceConfig": [
                "",
                "current date"
            ],
            "direction": "before",
            "number": 6,
            "unit": "hour"
        }

#3

@bachr I did implement this - weird thing is that when I change the interval on the calendar then many eval metrics are called in a serialized way increasing each time the end date with a value in the future not selected in the calendar - I do not understand which is the setting the leads to these autogenerated calls