Date picker setting for selecting only month and year

Is there any way to make the date picker only show the year and month to select?
I don’t need to select any day, just the year and month.

I have a query in sqlite that returns a monthly list. If I put a date picker the user will also be forced to select a day, and this can cause some confusion for the user who only wants to see the month …

I could use a spinner and put the years there, but from time to time I would have to update the app just to add more years … and that method I do not see very efficient …

The idea would be to be able to achieve something like this:

year

or something like this:

nhbXs

Is it possible?

You can make your own date picker. You want only year and month. So in every year, there are 12 months. And this is not changing.

Thank you for responding

But what component can I use to do it?
I tried a spinner and a clock component, I set the spinner elements to be assigned a list. Each item in the list uses the clock to put the current year, then the year - 1, then the year + 1, and so on…

But with this method I have to put 2 spinners. I would like to be able to do it in a single button (as a date picker… a single button that shows to choose 2 possibilities… year and month…))

Hello, I also need a component like yours that only shows the choice of month and year, without the day. Have you found a solution?