This does not work, because without a day it means 28-31 (depending on the month) days, and it can be any of them. If you want to keep the monthly selection without a day, you will see that this is a date range, not the date “a”.
The date tip always saves the entire date as a date field. If you only know the month and year, you need to have two (non-dates) fields, one for each. But, as you can see, this will lose you a lot, and you will need to configure each field, check it, etc. Big pains, so good reasons are enough for this.
The only thing I can offer is: create a hidden div or apply css if you cannot "enter" the standard date field in the form for the "day". Then set the value always to 01. Then you can have a "date" field, which will store the 01-month year in the database. This is definitely a “hack”!
source share