Prop Datetime Disabled
# Input Datetime disabled Property
[ Input Datetime Object](#)
## Example
Disable the datetime field:
document.getElementById("myDatetime").disabled = true;
The output will be:
[Try it Β»](#)
* * *
## Definition and Usage
The disabled property is used to set or return whether a datetime field is disabled.
An element with the disabled property is unusable and unclickable. Disabled elements are usually rendered in gray in the browser.
This property reflects the HTML disabled attribute.
* * *
## Browser Support

All major browsers support the disabled property.
**Note:** Internet Explorer, Firefox, Opera 15 (and later) or Chrome support the element with type="datetime".
* * *
## Syntax
Return the disabled property:
_datetimeObject_.disabled
Set the disabled property:
_datetimeObject_.disabled=true|false
## Property Values
| Value | Description |
| --- | --- |
| true|false | Specifies whether the datetime field is available. * true - datetime field is not available * false - Default. datetime field is available |
## Technical Details
| Return Value: | A Boolean. Returns true if the datetime field is not available, otherwise false |
| --- |
* * *
## More Examples
## Example
Check if the datetime field is available:
var x = document.getElementById("myDatetime").disabled;
The output of _x_ will be:
true
[Try it Β»](#)
## Example
Disable and enable the datetime field:
function disableBtn() {
document.getElementById("myDatetime").disabled = true;
}
function undisableBtn() {
document.getElementById("myDatetime").disabled = false;
}
[Try it Β»](#)
* * *
## Related Pages
HTML Reference: (#)
* * Input Datetime Object](
YouTip