Initiative:
Create a standardized form field for date entry, providing automated
validation and error handling
Reasons:
* We have now proper form validation
* Usability improvements and consistent user experience are on top of the Drupal "battle plan"
Issues:
Issues raised on the discussion:
http://lists.drupal.org/archives/drupal-devel/2003-12/msg00861.html
What field format? Three alternatives were offered:
a) row of dropdowns
- easy to parse & validate
- should incorporate Javascript to make it behave locically (user selects "Feb", dynamically remove the "30" and "31" from "day" dropdown)
- slower date entry
- not always flexible (in some cases the time field(s) are needed, sometimes not)
b) textfield for manual entry
+ quick entry for power users
- utterly complex date parsing and validation
c) provide both, make it a configuration option
- arrgh-not-another-config-option!!!
Background reading about date entry usability and issues:
http://www.travelucd.com/research/pdf/date_entry_hotel_july2002.pdf
http://www.peachpit.com/content/images/073571410X/samplechapter/07357141...
Comments
Comment #1
moshe weitzman commentedProfile.module has some nifty logic for displaying date selectors on an input form. Move that logic to common.inc so other modules may benefit. See _profile_date_field(). It uses the row of 3 dropdowns to compose a date. The javascript would be nice but it isn't a requirement, IMO
Comment #2
Chris Johnson commentedSome additional considerations:
1. Validating what's in the fields is a very different thing from providing the HTML form fields in a standard way, as long as we are talking about not using Javascript to do it. If this "task" is supposed to include validation, well, then it is a ten to thirty times larger task and includes changing a lot more code. That's the reason I created a separate new task and patch for just adding the HTML date form.
2. Some other advantages and disadvantages for each method.
a) Row of dropdowns
+ Nice for the point and click crowd
- Really annoying for the touch-typist crowd as they do not work consistently when attempting to type the value wanted.
b) One big textfield to type the date.
- Just plain unworkable. There are too many valid date format variations if you want to validate as in #1 above.
c) Configuration selection between the two.
+ Allow the user to choose which format he wants since that is who it most affects?
Instead of (b), one big text field, I believe my 3-text field solution is far better, and best for touch typists. Validating each field is simple.
Comment #3
Chris Johnson commentedDuplicate of http://drupal.org/node/12218. Please go there.