Input Datetime form Attribute
Definition and Usage
form
This property returns a reference to the form containing the date-time field.
This property returns the form object on success.
Note:This property is read-only.
Example
Return the id of the form containing the <input type="datetime"> element:
var x = document.getElementById("myDatetime").form.id;
Grammar
datetimeObject.form
Technical Details
Return Value: |
Reference to the form element containing the date/time field. If the date control is not in the form, it returns |
---|
Browser Support
The numbers in the table indicate the first browser version that fully supports this property.
Chrome | Edge | Firefox | Safari | Opera |
---|---|---|---|---|
Chrome | Edge | Firefox | Safari | Opera |
Support | 10.0 | Support | Support | Support |
Note:The <input type="datetime"> element does not display any date/time field/calendar in any mainstream browser except Safari.