Date Picker to select only Month and Year and set day to always 01 or work around

By: Steven M | Asked: 11/15/2023
ForumsCategory: How-toDate Picker to select only Month and Year and set day to always 01 or work around
Steven MSteven M asked 5 months ago
HI I need to collect a date, which requires only selecting the Month and the year and setting the day only to be "01" For example, the user selects "a Month or a year, and the result would be 01-month-year. A user selects January and 2024. It would be "2024-01-01."  I can see a hook that allows you to hide a date picker month and year but not day. One option (not ideal) would be to select two drop-downs, one with 1 to 12 months and the other with 2024 to 2034, and then use this data to set the default field date in a date field. If this is the simplest way, how would I format the default date so it does this? I am looking for the simplest solution, not an overlay complex solution or a reference to hire a developer.  Thank you!

Making the Best WordPress Plugin even better - Together

Take on bigger projects with confidence knowing you have access to an entire community of Formidable Experts and Professionals who have your back when the going gets tough. You got this!
Join the community
crossarrow-right