View Full Version : get/setValue on Ext.form.TimeField

14 Dec 2009, 8:12 AM
Hey, I've been searching the forums and looking at the docs and I haven't found (I have stupid eyes at times) a way to get/setValue of Ext.form.TimeField with the index of the item. It returns the time that is selected ie: "5:00 PM". If I have increments of 15 mins, there should be 96 values for a complete day worth of time slices. (12:00 AM, 12:15 AM, ... , 11:45 PM).

I need to set and get the value of that field. Ext.form.TimeField.selectedIndex returns -1 when I use setValue().

Is there a way to return the numeric value of the time value?

5:00 PM should be 86 (index when using 15 mins interval).

14 Dec 2009, 9:43 AM
listeners: {
select: {
fn: function (value) {

14 Dec 2009, 9:49 AM
Maybe I'm not being clear. I can get the value, that's no problem. My problem is that it's returning the Text as the value (eg. "4:00 PM") and I want to return the selected index or the value behind the selected text.

17 Dec 2009, 9:59 AM
Nevermind, made my own with a ComboBox...