Skip to Content
0
Jun 26, 2020 at 04:51 AM

How to enable Semantic Date Range in Smart Filter Bar?

615 Views Last edit Jun 26, 2020 at 11:31 AM 4 rev

Hello.

I have a List Report app generated by template.

I want to convert filter items to Date Range Type like below sample.

https://sapui5.hana.ondemand.com/1.75.0/#/entity/sap.ui.comp.smartfilterbar.SmartFilterBar/sample/sap.ui.comp.sample.smartfilterbar.ControlConfigurationDateRangeType

The documentation says we need to insert below code to manifest.json, but I don't know which section I should put this in.

"sap.ui.generic.app": {
    “pages”: {
        “component”: {
            "filterSettings": {
                "dateSettings":{
                    "useDateRange": true 
                }
            }
        }
    }
}

I have tried below and several other patterns but it didn't work.

	"sap.ui.generic.app": {
		"_version": "1.3.0",
		"settings": {
			"forceGlobalRefresh": false,
			"objectPageHeaderType": "Dynamic",
			"showDraftToggle": false			
		},
		"pages": {
			"ListReport|EntitySet": {
				"entitySet": "EntitySet",
				"component": {
					"name": "sap.suite.ui.generic.template.ListReport",
					"list": true,
					"filterSettings": {
						"dateSettings":{
							"useDateRange": true
						}
					},								
					"settings": {
						"smartVariantManagement": true,
						"condensedTableLayout": true
					}
				},
				"pages": {
					"ObjectPage|EntitySet": {
						"entitySet": "EntitySet",
						"component": {
							"name": "sap.suite.ui.generic.template.ObjectPage"
						}
					}
				}
			}
		}

I also tried putting "filterSettings" under "settings" section, but it didn't work either.

		"pages": {
			"ListReport|EntitySet": {
				"entitySet": "EntitySet",
				"component": {
					"name": "sap.suite.ui.generic.template.ListReport",
					"list": true,								
					"settings": {
						"smartVariantManagement": true,
						"condensedTableLayout": true,
						"filterSettings": {
							"dateSettings":{
								"useDateRange": true
							}
						}
					}
				},