YouTip LogoYouTip

Prop Datetime Local Disabled

# Input DatetimeLocal disabled Property [![Image 8: Input DatetimeLocal Object Reference Manual](#) Input DatetimeLocal Object](#) ## Example Disable the local time field: document.getElementById("myLocalDate").disabled = true; The output is: [Try it Β»](#) * * * ## Definition and Usage The disabled property is used to set or return whether the local time field is disabled. An element with the disabled property is unusable and unclickable. Disabled elements are usually rendered in gray in the browser. The property reflects the HTML disabled attribute. * * * ## Browser Support ![Image 9: Internet Explorer](#)![Image 10: Firefox](#)![Image 11: Opera](#)![Image 12: Google Chrome](#)![Image 13: Safari](#) All major browsers support the disabled property. **Note:** Internet Explorer or Firefox does not support the element. * * * ## Syntax Return the disabled property: _datetimelocalObject_.disabled Set the disabled property: _datetimelocalObject_.disabled=true|false ## Property Values | Value | Description | | --- | --- | | true|false | Describes whether the local time field is available. * true - The local time field is not available * false - Default. The local time field is available | ## Technical Details | Return Value: | A Boolean. Returns true if the local time field is not available, otherwise returns false | | --- | * * * ## More Examples ## Example Check if the local time field is available: var x = document.getElementById("myLocalDate").disabled; The output of _x_ is: true [Try it Β»](#) ## Example Disable or enable the local time field: function disableBtn() { document.getElementById("myLocalDate").disabled = true; } function undisableBtn() { document.getElementById("myLocalDate").disabled = false; } [Try it Β»](#) * * * ## Related Pages HTML Reference: (#) * * Input DatetimeLocal Object](#)
← Prop Datetime Local FormProp Datetime Local Autofocus β†’