When one sets
enabled_periods_UI = "day,week,month,year" # without range
the date selector hides the possibility to select a date range, but it still allows comparing to date ranges (which will succeed as the API is used).
when one also adds
enabled_periods_API = "day,week,month,year"
the UI still allows the comparisons, but the user will only see errors:
The period 'range' is not supported. Try any of the following instead: day, week, month, year