HTML tutorial
CSS3 tutorial
Bootstrap tutorial
JavaScript tutorial
JQuery tutorial
AngularJS tutorial
React tutorial
NodeJS tutorial
PHP tutorial
Python tutorial
Python3 tutorial
Django tutorial
Linux tutorial
Docker tutorial
Ruby tutorial
Java tutorial
C tutorial
C ++ tutorial
Perl tutorial
JSP tutorial
Lua tutorial
Scala tutorial
Go tutorial
ASP.NET tutorial
C # tutorial
Input DatetimeLocal Object : Set a local datetime field to read-only
The readOnly property sets or returns whether a local datetime field should be read-only, or not.
A read-only field cannot be modified. However, a user can tab to it, highlight it, and copy the text from it.
This property reflects the HTML readonly attribute.
Property | |||||
---|---|---|---|---|---|
readOnly | Yes | 10.0 | Yes | Yes | Yes |
Return the readOnly property:
Set the readOnly property:
Value | Description |
---|---|
true|false |
Specifies whether a local datetime field should be read-only, or not
|
Return Value: | A Boolean, returns true if the local datetime field is read-only, otherwise it returns false |
---|
Find out if a local datetime field is read-only or not:
var x = document.getElementById("myLocalDate").readOnly;
HTML reference: HTML <input> readonly attribute
❮ Input DatetimeLocal Object