Hi,
As far as I know, there is no control in Dynamics 365 that can be used for this purpose. PCF control seems to be a fair idea.
However another approach is to use a lookup:
- Create a custom entity 'Years'.
- Create following records:
- Label: 2020
- Value: -1 (for previous Years)
- Label: 2021
- Value: 0 (current year)
- Label: 2022
- Value: 1 (next year)
- Add this lookup to your entity.
The drawback for this approach is to you have to update the labels every year.
You can also create an Entity to load All years (starting form 2019). Then create a view to only list data for Prev. Current and Next Year (using date filters and OR operator).
Finally, you can also create an optionset, add all year and filter the values onload of the form (using JavaScript).