Is there a way to have a drop down with the year (going back 50 years) that stays current with whatever the current year is?

Comments

quicksketch’s picture

Status: Active » Fixed

Yes, you just set the starting year to -50. (It defaults to -2).

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

DrupalKing’s picture

Hmm, I want it to just list the year, not the month and day.

ndewhurst’s picture

Version: 7.x-3.x-dev » 6.x-3.4
Component: Code » Documentation
Category: feature » support

*edited*

ndewhurst’s picture

Version: 6.x-3.4 » 7.x-3.x-dev
Component: Documentation » Code
Category: support » feature

I, too, want to list only the year, while taking advantage of the year range parameters and option auto-generation of the date field type. Has anyone already done this?

vernond’s picture

Version: 6.x-3.4 » 7.x-3.x-dev
Component: Documentation » Code
Category: support » feature

Off the top of my head it may be easiest to make a little custom module and use hook_form_alter to change the month and day bits of the FAPI array into hidden fields with a default value that will still validate as an actual date (01 and 01 for example)