-
29 Oct 2007 3:07 PM #1
[2.0b1] Date *and* Time Field anyone?
[2.0b1] Date *and* Time Field anyone?
Hi folks,
I don't suppose anyone out there has already built a DateTimeField they're happy to share? It's a faint hope, but I need to edit a date/time value in a grid (splitting it up into two separate columns isn't an option), so I'm looking for a combined field to use as the editor which handles both the date and the time part.
Separately, if no one just happens to have written this for me
, any advice for how to get started creating one would be greatly appreciated. It seems like it should be dead easy to create a new Field which is just a DateField next to a TimeField, but I'm still finding my way around... (The other option, of course, would be to extend DatePicker to optionally handle time values as well and then make sure the new config option gets passed through to it from DateField [via DateMenu and DateItem]. That's probably the better route, but more complicated...)
Thanks in advance,T.J. Crowder
tj / crowdersoftware / com
-
29 Oct 2007 3:11 PM #2
We have written one, but not to share.
I think it's going to be rewritten though to use two linked Ext fields, a DateField, and TimeField which do not get submitted, and a hidden which is updated onchange with the full ISO 8601 datetime string and is submitted to the server.
It should not be too hard to wrap the two up in 2 cells of a table.
-
29 Oct 2007 3:18 PM #3
Drat.

Yeah, in the short term it shouldn't be too hard. Tempting to get into DatePicker and extend it (not least to better understand Ext components), but if it's going to be revamped before too long anyway, I'll look at short- to medium-term workarounds.
Thanks (as always),T.J. Crowder
tj / crowdersoftware / com
-
29 Oct 2007 3:23 PM #4
I don't think we'll share the code. It's part of our app.
-
29 Oct 2007 3:34 PM #5
-
3 Dec 2007 7:55 PM #6
Bump.
I am also looking for a DateTimeField. Will have a crack at writing my own, but if anyone's already got one to share, that'd be great
-
7 Dec 2007 1:21 AM #7
I also need a DateTimeField.
I am newbie with extjs and I am not able to write my own.
Many other js library have that widget and I think that is very useful also for ExtJS users.
Please, can anyone help us?


Reply With Quote