HTML | DOM Input Datetime name Property Last Updated : 23 Sep, 2022 Summarize Comments Improve Suggest changes Share Like Article Like Report 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 Javascript. Syntax: For returning the name property:datetimeObject.nameFor setting the name property:datetimeObject.name = name Property Value: name: It is used to specify the name of the datetime field. Return Values: It returns a string value which specify the name of the Input Datetime field. Below program illustrates the Datetime name property :Example 1: Getting the name of a datetime field. HTML <!DOCTYPE html> <html> <head> <title>Input Datetime name 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 name Property</h2> <br /> Date of Birth: <input type="datetime" id="Test_Datetime" name="DOB" /> <p> To display the value of the name attribute of the datetime field, double-click the "Return Name" button. </p> <button ondblclick="My_Datetime()">Return Name</button> <p id="test"></p> <script> function My_Datetime() { var n = document.getElementById("Test_Datetime").name; document.getElementById("test").innerHTML = n; } </script> </body> </html> Output: Before: After clicking the button: Example 2: Below code sets the dateTime name property. HTML <!DOCTYPE html> <html> <head> <title>Input Datetime name 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 name Property</h2> <br /> Date of Birth: <input type="datetime" id="Test_Datetime" name="DOB" /> <p> To Set the value of the name attribute of the datetime field, double-click the "Return Name" button. </p> <button ondblclick="My_Datetime()">Set Name</button> <p id="test"></p> <script> function My_Datetime() { var n = (document.getElementById("Test_Datetime").name = "date of birth"); document.getElementById("test").innerHTML = n; } </script> </body> </html> Output: Before: After clicking the button: Note: The <input type="datetime"> element does not show any datetime field/calendar in any major browsers, except Safari. Supported Web Browsers Apple SafariInternet ExplorerFirefoxGoogle ChromeOpera Comment More infoAdvertise with us Next Article HTML | DOM Input Date name Property S Shubrodeep Banerjee Follow Improve Article Tags : Web Technologies HTML HTML-DOM Similar Reads HTML | DOM Input Date name Property The Input Date name property is used for setting or returning the value of the name attribute of a date 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 JavaScript.S 2 min read HTML | DOM Input DatetimeLocal name Property The Input DatetimeLocal name property is used to set or return the value of the name attribute of a datetimeLocal 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 Ja 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 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 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 DatetimeLocal min Property The Input DatetimeLocal min property is used for setting or return the value of the min attribute of the datetimeLocal field. It is used to specify the minimum value of date and time for a datetimeLocal field. It returns a string that represents the minimum date and time allowed. Syntax: It returns 2 min read Like