Deadline date range

toddwoof - December 29, 2008 - 16:42
Project:Job Posting
Version:6.x-1.10
Component:Code
Category:feature request
Priority:normal
Assigned:Unassigned
Status:closed
Description

Is there a way to restrict the deadline date field's year options to something reasonable? Ideally, no years earlier than now, since you can't select them anyway, and maybe just this year and next year. (I currently see 1900 through 2050.)

#1

gmarus - January 7, 2009 - 16:48

This is the range provided for years under the 'date' type form control provided by Drupal Core's forms API so changing it would imply modifying that code (not module code). Alternatively, within the module itself one could edit the code and switch to using a standard 'select' control (which is what I used to allow user to choose the time of day) and specify whatever range criteria one desires.
I'm curious, is this mostly asthetic or is there something in your business case that necessitates the more restricted range (since as you note, there's already some error-checking there to prevent dates in the past)?

#2

toddwoof - January 8, 2009 - 18:50

It's usability: Providing selections that the user can't select (any time before now) seems like bad UI design; and of course it makes a really big list instead of showing just the one or two relevant items.

Since someone might post a job late in December, at least two years are needed. But in practical terms I can't think of any case where it would make sense for a job listing to remain active for more than an entire year, so there is no reason to provide choices other than this year and next year.

#3

gmarus - September 30, 2009 - 17:14
Status:active» closed
 
 

Drupal is a registered trademark of Dries Buytaert.