- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
HTML DOM Input DatetimeLocal Object
The HTML DOM Input DatetimeLocal Object represents an input HTML element with type datetimeLocal.
Syntax
Following is the syntax −
- Creating an <input> with type datetimeLocal
var datetimeLocalObject = document.createElement(“input”); datetimeLocalObject.type = “datetime-local”;
Attributes
Here, “datetimeLocalObject” can have the following attributes −
Attributes | Description |
---|---|
autocomplete | It defines the value of autocomplete attribute of a datetimeLocal field |
autofocus | It defines if the datetimeLocal field should be focused on initial page load. |
defaultValue | It sets/returns the default value of datetimeLocal field |
disabled | It defines if datetimeLocal field is disabled/enabled |
form | It returns a reference of enclosing form that contains the datetimeLocal field |
max | It returns/sets the value of max attribute of datetimeLocal field |
min | It returns/sets the value of min attribute of datetimeLocal field |
name | It defines the value of name attribute of a datetimeLocal field |
readOnly | It defines if the datetimeLocal field is read only or not |
required | It defines if the datetimeLocal field is compulsory to be filled in order to submit the form |
step | It defines the value of the step attribute of datetimeLocal field |
type | It returns the type of form element of datetimeLocal field |
value | It defines the value of the value attribute of a datetimeLocal field |
Boolean Values
And, also the following methods −
booleanValue | Details |
---|---|
stepDown | It defines the amount of minutes the datetimeLocal field should decrease. |
stepUp | It defines the amount of minutes the datetimeLocal field should increase. |
Advertisements