You could create an enumeration for the months, since most years have the same number of months in them... and for the year you could create an integere attribute. The combination of these two can easily be combined into a datetime() function to create an actual datetime attribute, if you'd like. This way you don't have to check and parse any strings. Also see: https://docs.mendix.com/refguide4/date-creation
I would create a non persistant entity with a string attribute and in the reference selector use a microflow to create the 12 objects where you fill the strings with the years and the months (this way you can make sure that always the coming twelve months can be selected). In the on change microflow you can then use the selected option to create the date from the string and save this date in the entity that holds this value. Hope this helps.
If it is only for display purpose you can also use a normal date attribute and select the date format of the Date picker as 'Custom' with custom date format 'yyyy/MM'. So you select a specific date but the yyyy/MM is shown on your page.