Login Register

Do DateTextBox, TimeTextBox support Date and Time selection?

Hi guys,

I've been trying to find out whether dojo supports a Date+Time selection widget. The documentation is a little confusing. The book of dojo mentions that the "selector" attribute for DateTextBox, TimeTextBox has a default of 'both'. (http://dojotoolkit.org/book/dojo-book-0-9/part-2-dijit/form-validation-s...)

However, this ticket ( http://trac.dojotoolkit.org/ticket/1872 ) suggests that a Date + Time widget is being considered for the future.

What is the situation here? I'm seeing issues with the TimeTextBox when used to select both (year always appearing as 1/1/1970) but am not sure whether I should submit a bug.

Cheers.

no date/time widget yet...

Though it's often requested.

DateTextBox and TimeTextBox widgets work on dates and times, respectively, and set the 'selector' property to match that. Because they share common code and call the same formatting tools, a little bit of inheritance shows through, and selector is one of the things you see in the docs. As I recall, setting selector to 'datetime' doesn't break the widgets, and it might even let you enter full dates and times in the input control, or wrap around the timepicker 24 hrs to get to the next day, but it's not at all intuitive. A new widget is clearly needed.