I would like to create a dropdown that contains date periods already defined in a fixed way.
So it should contain the following items for example:
- this month
- last month
- last 3 months
- last 6 months
- last year
When the user selects one of the options, I should be able to convert this into a date range (date from and date till) and use it to filter my dataset.
Anyone has a thought on how to achieve this?