YouTip LogoYouTip

Prop Month Disabled

# Input Month disabled Property [![Image 8: Input Month Object Reference](#) Input Month Object](#) ## Example Disable the month field: ```javascript document.getElementById("myMonth").disabled = true; The result could be: [Try it Β»](#) * * * ## Definition and Usage The `disabled` property sets or returns whether a month field is disabled or not. A disabled element is unusable and unclickable. Disabled elements are usually rendered in gray by the browser. This 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](#) The `disabled` property is supported by all major browsers. **Note:** Internet Explorer or Firefox does not support the `` element with `type="month"`. * * * ## Syntax Return the `disabled` property: `monthObject.disabled` Set the `disabled` property: `monthObject.disabled=true|false` ## Property Values | Value | Description | | --- | --- | | true|false | Describes whether the month field is available.
* `true` - The month field is disabled
* `false` - Default. The month field is enabled | ## Technical Details | Return Value: | A Boolean. Returns `true` if the month field is disabled, otherwise returns `false` | | --- | * * * ## More Examples ## Example Check if the month field is disabled: ```javascript var x = document.getElementById("myMonth").disabled; The output of _x_ will be: `true` [Try it Β»](#) ## Example Disable or enable the month field: ```javascript function disableBtn() { document.getElementById("myMonth").disabled = true; } function undisableBtn() { document.getElementById("myMonth").disabled = false; } [Try it Β»](#) * * * ## Related Pages HTML Reference: (#) * * Input Month Object](#)
← Prop Month FormProp Month Autofocus β†’