Hi,Experts:
I need a date filter in the smartFilterToolBar,and set a default range date value. So I use the annotation with the following codes, but the '@Consumption.filter.defaultValueHigh' doesn't work.
@Consumption.filter.defaultValue: '20211201' @Consumption.filter.defaultValueHigh: '20211207'//defaultValueHigh (doesn't work) @Consumption.filter.selectionType: #INTERVAL @EndUserText.label: 'Created Date'
And I can see the metadata contain the "FilterDefaultValueHigh"
Here is the result with the annotaion.
I can only solve it by fiori-element extension.(ListReportExt.controller.js)
modifyStartupExtension: function(oStartupObject) { var oSelectionVariant = oStartupObject.selectionVariant; if (oSelectionVariant) { oSelectionVariant.removeSelectOption("CreatedDate"); var iYear = new Date().getFullYear(), iMonth = new Date().getMonth() + 1, iDate = new Date().getDate(); oSelectionVariant.addSelectOption("CreatedDate", "I", "BT", iYear + "-" + iMonth + "-" + 1, iYear + "-" + iMonth + "-" + iDate); } }
Here is the result after extension.
Although through the extension I can solve it, but I want to know why the annotaion '@Consumption.filter.defaultValueHigh' doesn't work? Can someone Help me? Thanks!