Opened 8 years ago

Closed 8 years ago

#13907 closed defect (duplicate)

DateTextBox: text unselectable unless openOnClick=false

Reported by: whitakersp Owned by: bill
Priority: high Milestone: tbd
Component: Dijit Version: 1.6.1
Keywords: dojo datetextbox Cc:
Blocked By: Blocking:

Description

I have a Dojo DateTextBox? that per requirement will also allow a time after the date.

<input type="text" name="date1" id="date1" value="" dojoType="dijit.form.DateTextBox" constraints="{datePattern:'dd MMM yyyy HHmm'}" required="false" />

This all works fine. What I want to know is by default dojo has text selection disabled. I can not highlight the text or put the cursor where I want it, or paste into it. It always displays at the end of the selection and you have to use the arrow keys to move the selection. Is there a way to make it so the datetextbox works like a text box with a calendar? Thanks

Change History (3)

comment:1 Changed 8 years ago by Douglas Hays

Component: Dijit - FormDijit
Owner: changed from Douglas Hays to bill
Summary: Dojo DateTextBox selectable text reference ticket 24131DateTextBox text unselectable

Broken starting with [24131] since _HasDropDown is preventing the mousedown event that starts text selection.

comment:2 Changed 8 years ago by bill

Hmm, that stopEvent() call is only supposed to happen when the mousedown occurs on the arrow icon. But you are doing the mousedown in the input area, right? Do you have an arrow icon?

comment:3 Changed 8 years ago by bill

Resolution: duplicate
Status: newclosed
Summary: DateTextBox text unselectableDateTextBox: text unselectable unless openOnClick=false

Oh, OK probably what you want is to just set openOnClick="false". That will let the user select the text in the input box, and the user can still display the Calendar by clicking the arrow icon.

I agree that's confusing, so I filed #14142 so you won't need to do that, starting in 1.8.

Marking this ticket as a "duplicate" of that ticket although that's not quite the right word.

Note: See TracTickets for help on using tickets.