Display of the date drop down field

Hi, I have two questions relating to the date drop down field.

  1. I have setup the date field with a minimum date of 2019 and a maximum date of 2024 using:

add_filter( ‘gform_date_min_year’, ‘set_min_year’ ) and
add_filter( ‘gform_date_max_year’, ‘set_max_year’ )

The display of the years are displaying in the reverse order to what I would like with 2024 as the first option which doesn’t seem logical. How do I reverse the display of the years?

  1. I would like to display the names of the months rather than the numbers of the month on the drop-down field. How do I do this?

Thanks for any help!

I would recommend creating your own drop downs to enforce the range and format you like. There are not other filters available for the date drop downs specifically.

You could dynamically generate the drop down if you like, so you don’t have to update your code manually (you could always show the 5 years that you want starting with the current month):

Here is an approach for creating your own drop downs:

1 Like

Thanks for the help!