jQuery UI Widgets › Forums › General Discussions › Editors › DateTimeInput › DateTimeInput readonly not working
Tagged: datetimeinput, jqxdatetimeinput, readonly, setDate
This topic contains 4 replies, has 3 voices, and was last updated by Dimitar 10 years, 8 months ago.
-
Author
-
I’m playing around with the controls and I discovered that the readonly property (your demo) is not working in any browser (IE11, FF32.0.2, Chrome 37.0.2062.120 m (64-bit)).
Is it a bug or something in the creation of the control?
your code is
<div style=”margin: 10px;” id=’jqxDateTimeInput’></div>
$(“#jqxDateTimeInput”).jqxDateTimeInput({
width: ‘250px’,
height: ’25px’,
theme: ‘energyblue’,
readonly: true
});Thank you very much
Hello fanisch,
We tested the following fiddle: http://jsfiddle.net/jqwidgets/yv5gR/ and the readonly property works as expected on all browsers – the datetimeinput value can only be modified through the pop-up calendar and not by entering in the input itself.
Best Regards,
DimitarjQWidgets team
http://www.jqwidgets.com/Hello Dimitar,
given your explanation of what readonly property does yes it works on all browsers, although IMHO the semantically is not every correct (the value should not change in any way but the control could take focus and the user could copy its value like the input element) but again that’s only my opinion.
Thank you very much
I have the same problem.
Readonly property of the DateTimeInput doesn’t work:
Here is the code:$("#docDate").jqxDateTimeInput({width: '100px', height: '25px', formatString: "yyyy-MM-dd", readonly:true}); $("#docDate").jqxDateTimeInput('setDate', $("#date").jqxDateTimeInput('getDate'));Hello cpuin,
As I have already explained, the readonly property set to true prevents changing the date when typing. The date can still be changed with a method or selection from the calendar.
Best Regards,
DimitarjQWidgets team
http://www.jqwidgets.com/ -
AuthorPosts
You must be logged in to reply to this topic.