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

Turn off date/time autocomplete

3 Answers 657 Views
Date/Time Pickers
This is a migrated thread and some comments may be shown as answers.
Jean-François
Top achievements
Rank 1
Jean-François asked on 22 Jan 2013, 06:58 PM
Hi, 

Is there a way we could add "autocomplete=off" to the date and time input fields? We simply don't want the field to be auto-completed using previously entered values.

Thanks

3 Answers, 1 is accepted

Sort by
0
Georgi Krustev
Telerik team
answered on 24 Jan 2013, 08:56 AM
Hello Jean-François,

 
You can add "autocomplete" attribute to the input element. Check this code snippet:

$("#datepicker").attr("autocomplete", "off").kendoDatePicker();


Regards,
Georgi Krustev
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
Jean-François
Top achievements
Rank 1
answered on 24 Jan 2013, 02:15 PM
Hi, 

Thanks for the answer. However I forgot to mention that we use the ASP.NET MVC bindings, therefore we would prefer to define it there, to avoid syncing 2 IDs in order to add this attribute in JS at a later time. 

Thanks again!
0
Georgi Krustev
Telerik team
answered on 25 Jan 2013, 09:16 AM
Hi,

 
In that case, you will need to use the HtmlAttributes method:

.HtmlAttributes(new { style = "width:150px", autocomplete="off" })

I will suggest you check the demos of DatePicker wrapper for ASP.NET MVC.

Kind regards,
Georgi Krustev
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Tags
Date/Time Pickers
Asked by
Jean-François
Top achievements
Rank 1
Answers by
Georgi Krustev
Telerik team
Jean-François
Top achievements
Rank 1
Share this question
or