HTML | DOM Input Datetime form Property Last Updated : 14 Sep, 2022 Comments Improve Suggest changes Like Article Like Report The Input Datetime form property is used for returning a reference to the form containing the Datetime field. It is a read-only property that returns a form object on success, else if the date control is not in the form, it returns NULL. Syntax: datetimeObject.form Return Values: It returns a string value which specify the reference of the form containing the Input datetime field Below program illustrates the Datetime form property: Example: Returning the id of the form containing the <input type="datetime"> element. HTML <!DOCTYPE html> <html> <head> <title>Input Datetime form Property in HTML</title> <style> h1 { color: green; } h2 { font-family: Impact; } body { text-align: center; } </style> </head> <body> <h1>GeeksforGeeks</h1> <h2>Input Datetime form Property</h2> <br> <form id="Test_Form"> Test date control: <input type="datetime" id="Test_Datetime"> </form> <p>To return the id of the form, double click the "Return Form Object" button.</p> <button ondblclick="My_Datetime()"> Return Form Object </button> <p id="test"></p> <script> function My_Datetime() { // Return Input Datetime form Property var d = document.getElementById("Test_Datetime").form.id; document.getElementById("test").innerHTML = d; } </script> </body> </html> Output:Before clicking the button: After clicking the button: Note: The <input type="datetime"> element does not show any datetime field/calendar in any major browsers, except Safari. Supported Browsers: Apple SafariInternet ExplorerFirefoxGoogle ChromeOpera Comment More infoAdvertise with us Next Article HTML | DOM Input Datetime form Property S Shubrodeep Banerjee Follow Improve Article Tags : Web Technologies HTML HTML-DOM Similar Reads HTML | DOM Input Date form Property The Input Date form property is used for returning a reference to the form containing the Date field. It is a read-only property that returns a form object on success, else if the date control is not in the form, it returns NULL.Syntax: inputdateObject.form Return Values: It returns a string value w 1 min read HTML DOM Input DatetimeLocal form Property The Input DatetimeLocal form property in HTML DOM returns the reference to the form containing the local datetime field. It returns a form object on success, else if the date control is not in the form, it returns NULL. It is a read-only property. Syntax:Â Â datetimelocalObject.formReturn Values: It 1 min read HTML | DOM Input Datetime max Property The Input Datetime max property is used for setting or returning the value of the max attribute of a datetime field. The Input Datetime max attribute returns a string that represents the maximum date and time allowed.Syntax: For returning the max property: datetimeObject.maxFor setting the max prope 2 min read HTML | DOM Input Datetime min Property The Input Datetime min property is used for setting or returning the value of the min attribute of a datetime field. The Input Datetime min attribute returns a string that represents the minimum date and time allowed. Syntax: For returning the min property:datetimeObject.minFor setting the min prope 2 min read HTML | DOM Input Datetime type Property The Input Datetime type property is used for returning the type of form element the datetime field is. The Input Datetime type property returns a string that represents the type of form element the datetime field is. Browsers such as Safari and Opera return "datetime" as a result whereas browsers su 2 min read HTML | DOM Input Datetime name Property The Input Datetime name property is used for setting or returning the value of the name attribute of a datetime field. The form data which has been submitted to the server can be identified by the name attribute. The name attribute is also used for referencing form data on the client-side using Java 2 min read HTML DOM Input Datetime list Property The input DateTime list property in HTML DOM is used to return a reference to the list element that contains an input DateTime field.Syntax:datetimeObject.list.idReturn value: It returns a string value that represents the value of the id attribute of the datalist element.Example:Â Below HTML code is 1 min read HTML | DOM Input Datetime value Property The Input Datetime value property is used for setting or returning the value of the value attribute of a datetime field. The Input Datetime value attribute can be used for specifying a date and time for the datetime field. Syntax: For returning the value property:datetimeObject.valueFor setting the 2 min read HTML | DOM Input Datetime required Property The Input Datetime required property is used to check whether a datetime field must be filled out or not before submitting a form. Syntax: For returning the required property:datetimeObject.requiredFor setting the required property: datetimeObject.required = true|false Property Value: true|false : I 2 min read HTML | DOM Input Datetime readOnly Property The Input Datetime readOnly property is used for setting or returning whether a datetime field should be read-only, or not. The read-only field can be tabbed, highlighted and can be used for copying text but it cannot be further modified. The HTML readonly attribute is reflected by the Input Datetim 2 min read Like