Opened 12 years ago

Closed 11 years ago

#4742 closed defect (fixed)

TimePicker popup changes width as you scroll

Reported by: Adam Peller Owned by: haysmark
Priority: high Milestone: 1.1
Component: Dijit Version: 0.9
Keywords: Cc: dante
Blocked By: Blocking:


We used to have the same problem with Calendar months. The solution was to lay out all of the calendar months vertically and hide them, just to get the width in the layout.

Here, I suppose, you've got 24 fixed entries. If you laid them all out initially but show only what you need, that should get you the max width.

Change History (3)

comment:1 Changed 11 years ago by Douglas Hays

I ran dijit/tests/form/test_TimeTextBox.html and I'm not seeing the width changing. I do see the height changing due to the different heights of the visible elements. peller, can you update this problem with what you see as broken?

comment:2 Changed 11 years ago by Adam Peller

Cc: dante added

so I think the problem went away with dante's restyling of the widget. Now there's ample horizontal space (fixed space?) such that the TimePicker? (popup) width is not dependent on the width of the text entries.

Is it safe to assume that the user will never encounter this? I'm not sure how that width is applied. The alternative is not pretty -- the Calendar trick was to construct all of the possible strings and hide them to compute the width, or perhaps this widget ultimately does that anyway?

comment:3 Changed 11 years ago by haysmark

Resolution: fixed
Status: newclosed

Before dante's restyling the width indeed changed.

To be perfectly clear on this, I tested the TimeTextBox? with formatLength:'long' (e.g. 6:30:00 PM Eastern Standard Time). I found that the text wraps to the next line, preserving the width. So the user will never encounter a width problem.

Note: See TracTickets for help on using tickets.