My suggestion: just use a text field. I find it annoying when things like this are over-engineered. Date popups are useful because it's hard to remember which dates go with which days of the week. But times have no such problem, and adding a bunch of drop-downs just gets in the way. A text field is easy to use, and easy enough to parse -- there aren't too many formats. If you want to make it mouse-friendly, use a combo box like the one in Google Calendar, with entries for every hour or half-hour. But let them type it in whatever format they want (e.g. 15:00 or 3:00 PM or 3pm).

Any and all code samples that are authored by me and posted on the Ext forums or website are hereby released into the public domain and I release anyone or entity of liability by using said code samples unless explicitly stated otherwise.

Opinions are mine and not necessarily endorsed by Ext, LLC. Please do not contact me directly for assistance unless requested by me.

Actually, I just built one. Basically, I'm working with items that have a publish date. It's nice if there are a variety of random looking dates available for people to publish from, so I seeded it with the current date, then added/subtracted in 15 minute increments to cover the entire day. The text field takes any time that Date.parse can understand, and reformats it to match what I want. This means you can enter, say, 23:00 and it gets converted to 11:00 am.

[2.1][TimeField] Format issue

When I use the "format" config option for Ext.form.TimeField, and use the following regex format "h:i a" I was waiting for something like '04:30 am' to be showed in the combo Box. But it seems that TimeField does not reconize very well the format... because it showed me a format like this '4:30 pm' (even if the range is from 07:00 AM to 11:00 PM the PM is always setted). This is my code

Thank you very much

Originally Posted by iomanip

When I use the "format" config option for Ext.form.TimeField, and use the following regex format "h:i a" I was waiting for something like '04:30 am' to be showed in the combo Box. But it seems that TimeField does not reconize very well the format... because it showed me a format like this '4:30 pm' (even if the range is from 07:00 AM to 11:00 PM the PM is always setted). This is my code