Opened 12 years ago
Closed 8 years ago
#7946 closed enhancement (wontfix)
[patch] [cla] TimestampTextBox / DateTimeTextBox dijit
Reported by: | afryer | Owned by: | |
---|---|---|---|
Priority: | low | Milestone: | future |
Component: | DojoX Form | Version: | 1.2.0 |
Keywords: | dijit DateTime Timestamp TextBox | Cc: | Adam Peller, Josh Trutwin |
Blocked By: | Blocking: |
Description (last modified by )
There are a lot of people that would like to have a TimestampTextBox in dijit. I ended up creating one and am creating this ticket to share the source, which may be useful as a reference for creating the real dijit/form/TimestampTextBox, if you end up doing this.
Attachments (2)
Change History (22)
Changed 12 years ago by
Attachment: | majalin.zip added |
---|
comment:1 Changed 12 years ago by
Component: | Dijit → DojoX Form |
---|---|
Description: | modified (diff) |
Owner: | set to dante |
Summary: | TimestampTextBox / DateTimeTextBox dijit → [patch] [cla] TimestampTextBox / DateTimeTextBox dijit |
Hmm, I'd suggest to put this into DojoX form first.
comment:2 Changed 12 years ago by
I have tried this one out and even integrating it into the grid by basically duplicating and renaming the declaration for dojox.grid.cells.DateTextBox? in .../grid/cells/dijit.js. Works wonderfully - for me.
comment:3 Changed 12 years ago by
I've tried it too and it even works without modifying "grid.cells..." code ( the only modification needed is included number.patch). You just set "type" to "dojox.grid.cells._Widget", "widgetClass" to "majalin.dijit.TimestampTextBox?" and it works :).
It would be good to be able to hide seconds spinner using some parameter. I do not need seconds in my project (I removed it from template) but it could be better to be able to customize it.
It looks like date & time patterns are fixed:
postMixInProperties: function() { dojo.mixin(this.constraints, { datePattern: 'dd/MM/yyyy HH:mm:ss', timePattern: 'HH:mm:ss' }); this.inherited(arguments); }
I would suggest to remove this method to be able to pass custom formats in constraints.
Thank you for the widget!
comment:4 Changed 12 years ago by
Cc: | Adam Peller added |
---|
comment:5 Changed 12 years ago by
Owner: | changed from dante to Nathan Toone |
---|
nathan - this might be a great addition to dojox.form - please investigate.
comment:6 Changed 12 years ago by
If my opinion counts any, please see if this can be added to the 1.2.x releases. As regular widget and as part of the grid.
It seems like in 1.2x Datagrid controls, you anyways already need to make changes (because all the controls use do not use attr( ) method to set values and generates warning)
I am generating my widgets dynamically from JSON and essentially for 'action-entry' I now have a single Dojo input widget. However the fact that there is no datetime widget causes me additional nesting logic because now I have to allow for more than one widget per my input field. And it is complicating my system enormously (database table changes/etc).
comment:7 Changed 12 years ago by
Sorry, maintenance releases are strictly limited to urgent bugs; enhancements aren't permitted. This would have to go in 1.3 or later.
comment:8 Changed 12 years ago by
Milestone: | tbd → future |
---|
comment:9 Changed 12 years ago by
Milestone: | future → 1.4 |
---|
comment:10 Changed 12 years ago by
I am willing to add this to dojox.form, if someone is willing to attach a test case.
comment:11 Changed 12 years ago by
Ok, I wanted to respond to toonetown response and provide a test case
But I ended up rewritting the Widget. It is based on the original concept of Antony (majalin above) but a) it uses the Time picker from dijit (it is there now) b) all the names are changed to fit into dojox.form namespace c) no separate stylsheet or template files d) all the set and get functions are changed and comply with 1.3.x 'attr set/get e) a test file is provided to show both programmatic and markup use f) I tested it within a grid as a grid cell but that test is not included g) I posted it on the dojo users list to ask for review last weeked but sofar did not get any responses. I had a question why I used the 'dijit' calendar popup and not the one in dojox -- I could add another Widget like this one only with a different name that uses that popup -- if that's desired or needed. just let me know.
I hope this can be reviewed and included (the zip file is attached).
having two separate widgets for date and time makes no sense for the application where the value has to be stored in one field. (as I indicated a while back my app looks at all the widgets in the page 'generically' in a loop needs a uniform access to all the widgets's data)
The screen shot is at http://www.excedone.com/sites/default/files/Dojox_DateTimeCombo.jpg
it is called dojox.form.DateTimeCombo?
comment:12 Changed 12 years ago by
Unfortunately both patch doesn't set the hidden input field value propery. the hidden field value is just "date" format not Timestamp nor DateTime? format.
I think the hidden field value also should set the same as displayed value.
comment:15 Changed 12 years ago by
Cc: | Josh Trutwin added |
---|
comment:16 Changed 11 years ago by
Milestone: | 1.4 → future |
---|
comment:17 Changed 11 years ago by
I noticed this hasn't been updated in 7 months, is there any plan to get this into a release? It'd be great to have a date/time picker, for most cases it makes no sense to have a time picker that doesn't allow you to select the date.
comment:20 Changed 8 years ago by
Resolution: | → wontfix |
---|---|
Status: | new → closed |
The TimestampTextBox idea is already supported as dijit/form/TimeTextBox. Dijit also has a DateTextBox. As for a DateTimeTextBox, that's covered by #10352.
zip file containing implementation of a TimestampTextBox?