set value input datetime code example Example 1: input datetime <input type="datetime-local"> Example 2: input datetime without time <input type="date" required>