Meridiem validation for popup

Scott Reynolds - November 5, 2009 - 00:59
Project:Date
Version:6.x-2.x-dev
Component:Code
Category:feature request
Priority:normal
Assigned:Unassigned
Status:needs work
Description

I can't imagine this handles all the cases. It just I don't have the energy right now to dig deeper into date. It gets pretty hairy pretty fast. Here is a simple solution that checks to see if you have 'A' as part of your format, and then checks to make sure the meridiem is then present in the time input and in caps. I am not going to use this patch on the live site, cause its a UX fail ("Sorry you have to enter AM or PM in caps otherwise we don't understand you" won't fly). I have provided only because its a 'heres what I got, this aweful hack and it still isn't good enough'.

This needs serious work as if I enter just 4:00 in the box it sets it to midnight.

My format is here: http://skitch.com/supermanscott/ngrfe/date-format

In fact, I think there is a lot of work that needs to be done around time validation for the popup.

/me tempted to mark as critical

In one of the other issues (its mark as a dup of the new jQuery timepicker one), someone mentioned making the meridiem another select input element. That would solve this usability fail, and avoid the need for general validation.

#1

Scott Reynolds - November 5, 2009 - 01:06

d.o timeout on me i looks like and failed to upload file

http://drupal.org/files/meridiem.patch < -- orginal

AttachmentSize
meridiem.patch 1.15 KB
 
 

Drupal is a registered trademark of Dries Buytaert.