Latest web development tutorials

HTML DOM Input Time disabled property

Input Time Object Reference Input Time Object

Examples

Disable time field:

. Document.getElementById ( "myTime") disabled = true;

The result could be:


try it"

Definition and Usage

disabled property sets or returns whether the time field is disabled.

Use the disabled attribute elements are not available and can not be clicked. Disabled elements are usually displayed on the browser gray.

This property reflects the HTML disabled property.


Browser Support

Internet ExplorerFirefoxOperaGoogle ChromeSafari

All major browsers support the disabled attribute

Note: Internet Explorer or Firefox browser does not support type = "time" attribute of the HTML <input> elements.


grammar

Returns disabled properties:

timeObject .disabled

Set the disabled attribute:

timeObject .disabled = true | false

Property Value

value description
true | false Description time field is available.
  • true - time field is unavailable
  • false - default. time field is available

technical details

return value: A Boolean value that, if time field is unavailable returns true, false otherwise


More examples

Examples

View time fields are available:

var x = document.getElementById ( "myTime") disabled.;
x The output is:
true

try it"

Examples

Disable and enable time fields:

function disableBtn () {
. Document.getElementById ( "myTime") disabled = true;
}
function undisableBtn () {
. Document.getElementById ( "myTime") disabled = false;
}

try it"


Related Pages

HTML Reference Manual: HTML <the INPUT> Disabled Property


Input Time Object Reference Input Time Object