Opened 11 years ago

Closed 11 years ago

Last modified 11 years ago

#12157 closed defect (fixed)

DateTextBox: prompt message always displayed

Reported by: JamesTung Owned by: Douglas Hays
Priority: high Milestone: 1.6
Component: Dijit - Form Version: 1.5
Keywords: Cc:
Blocked By: Blocking:


This problem only happened in dojo 1.5. When I set focus on field, the prompt message is displaying. But when I start typing or select a date, the prompt message is not disappear. This behavior is different with API description.

Attachments (2)

PromptMessageTest.html (1.0 KB) - added by JamesTung 11 years ago.
12157.patch (6.5 KB) - added by Douglas Hays 11 years ago.
patch for review

Download all attachments as: .zip

Change History (10)

Changed 11 years ago by JamesTung

Attachment: PromptMessageTest.html added

comment:1 Changed 11 years ago by bill

Owner: set to Douglas Hays
Summary: Prompt message always displayed in Date Text BoxDateTextBox: prompt message always displayed

Not sure if we should change the documentation or the behavior. You are right that it's inconsistent, current doc is:

If defined, display this hint string immediately on focus to the textbox, if empty. Think of this like a tooltip that tells the user what to do, not an error message that tells the user what they've done wrong. Message disappears when user starts typing.

comment:2 Changed 11 years ago by Douglas Hays

Milestone: tbd1.6

caused by [21846]

comment:3 Changed 11 years ago by Douglas Hays

I'd like to propose a compromise. The prompt displays when empty AND also while the textbox is Incomplete (user is typing but the value is not yet valid). So while the promptMessage is optional, if specified, it provides feedback as to when the field goes from Incomplete to valid, and doesn't yell at them if the user if tabbing through valid fields nor when they have inputed a valid value (especially with NumberTextBox?). Most textbox widgets don't have an Incomplete state but DateTextBox? does. Comments?

Changed 11 years ago by Douglas Hays

Attachment: 12157.patch added

patch for review

comment:4 Changed 11 years ago by bill

Seems fine to me.

comment:5 Changed 11 years ago by JamesTung

We are OK with this compromise. We just want to confirm that if an invalid or range message is configured, those take precedence over the prompt message for the error cases. The main problem is it needs to go away once correct data has been entered and he has proposed to do that.

comment:6 Changed 11 years ago by Douglas Hays

Resolution: fixed
Status: newclosed

(In [23575]) Fixes #12157. Only show promptMessage if the textbox is empty, or if it is Incomplete. Adjusted automated tests accordingly.

comment:7 Changed 11 years ago by Douglas Hays

(In [23577]) Refs #12157. Change tooltip placement test to show promptMessage for non-empty TextBox? values (Incomplete).

comment:8 Changed 11 years ago by bill

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