Opened 12 years ago

Closed 12 years ago

Last modified 8 years ago

#6044 closed defect (invalid)

TimeTextBox not returning displayed value on form submit

Reported by: guest Owned by:
Priority: high Milestone:
Component: Dijit - Form Version: 1.0
Keywords: Cc: Eric.A.Wood@…, Douglas Hays, haysmark
Blocked By: Blocking:

Description

I originally posted this on the Dijit forums but I've not gotten any response.

I have a TimeTextBox declared within a form. I have set up the text box to show the date and time as in this example:

<form id="dm_sched_cmd_form" name="Schedule Command" method="post" action="">
  <input type="text" dojoType="dijit.form.TimeTextBox"
                     name="scheduleTime" id="scheduleTime" style="width:10em"
                     constraints="{timePattern:'yyyy/MM/dd HH:mm'}"/>
</form>

When the user clicks on the text box, the drop down allows them to scroll through date and time and after selecting one, the text box displays date and time, which is exactly what I want. However, on form submit, the value of scheduleTime is equal to 'T' and the time portion only, i.e. T17:15:00 (which is interesting since the pattern specifies only minutes). Is there a way to have the text box send exactly what is displayed in it on form submit, or to specify the pattern that should be used on submit. It looked like serialize could do that, but how would I use that declaritively?

I looked at the code and found the following implementation for serialize in TimeTextBox.js

serialize: dojo.date.stamp.toISOString

I'm really confused. Based on the behavior I'm seeing that I described in my original post, I would expect it to actually return a string version of the time only in my box. According to the documentation for toISOString, it requires a date. Where does it get this from? How exactly does serialize work?

I have noticed that when I look at the POST in firebug, I see the correct date and time value displayed at the top, but not associated with any name. Then further down, I see the T17:15:00 associated with scheduleTime. Can anyone tell me what is going on?

Sorry to elevate this, but I need this to work.

Change History (3)

comment:1 Changed 12 years ago by guest

Forgot to CC myself. Can't figure out how to add CC after the fact. My email is Eric.A.Wood@… if whoever sees this can add me to the cc.

comment:2 Changed 12 years ago by Adam Peller

Cc: Eric.A.Wood@… Douglas Hays haysmark added
Resolution: invalid
Status: newclosed

Sorry you didn't get a reply. We'll work this out on the forums.

http://dojotoolkit.org/forum/dijit-dijit-0-9/dijit-support/timetextbox-not-returning-displayed-value-form-submit

and sorry, the way we have trac configured, it doesn't let you modify everything unless you get a trac account)

comment:3 Changed 8 years ago by bill

Component: DijitDijit - Form
Note: See TracTickets for help on using tickets.