This is a migrated thread and some comments may be shown as answers.

Prevent auto select on focus/click

5 Answers 489 Views
Date/Time Pickers
This is a migrated thread and some comments may be shown as answers.
Albin
Top achievements
Rank 1
Albin asked on 18 Nov 2014, 05:42 PM
Hi,

How do I prevent a date time picker's input box to NOT automatically select all the text on click? Essentially turning it into a default textbox?

5 Answers, 1 is accepted

Sort by
0
Kiril Nikolov
Telerik team
answered on 20 Nov 2014, 08:27 AM
Hi Albin,

I am not really sure I understand what exactly the problem is. Can you please check the following screencast and let me know what I missed?

http://www.screencast.com/t/PF0ymoNilKJC

Regards,
Kiril Nikolov
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
0
Albin
Top achievements
Rank 1
answered on 21 Nov 2014, 02:49 PM
Hi Kiril,

I forgot to mention that we used a masked input combine with the date time picker, sorry. It seems like the auto select on click behaviour is on the masked text box. http://demos.telerik.com/kendo-ui/maskedtextbox/index.

Is there a way we can disable this behaviour?
0
Kiril Nikolov
Telerik team
answered on 25 Nov 2014, 08:54 AM
Hello Albin,

I am afraid that this cannot be prevented without making changes in the Kendo UI code. Currently there is no option that you can set in order to prevent this from happening and it is actually the desired behavior of the widget.

If you think that such option should be introduced, please submit a UserVoice request, so it will be reviewed for a future release.

Regards,
Kiril Nikolov
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
0
Marie-Claude
Top achievements
Rank 1
answered on 23 Oct 2019, 12:29 PM

Hello, 

Do you have an update on this functionnality?

0
Viktor Tachev
Telerik team
answered on 25 Oct 2019, 11:46 AM

Hi,

The default behavior of the MaskedTextBox widget is to select the content when it is focused. If you would like to position the cursor explicitly I suggest using the approach from this thread.

The dojo below illustrates how the suggestion works:

https://dojo.telerik.com/iRiRiWiM

 

Regards,
Viktor Tachev
Progress Telerik

Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Tags
Date/Time Pickers
Asked by
Albin
Top achievements
Rank 1
Answers by
Kiril Nikolov
Telerik team
Albin
Top achievements
Rank 1
Marie-Claude
Top achievements
Rank 1
Viktor Tachev
Telerik team
Share this question
or