Skip to content
Related Articles

Related Articles

Improve Article

HTML | DOM Input Date stepDown( ) Method

  • Difficulty Level : Basic
  • Last Updated : 12 Mar, 2019
Geek Week

The Input Date stepDown() method is used for decrementing the value of the date field by a specified number. It can only be used on the days and not on months and years.



Parameter Used:

  • number: It is used to specify the number of days the date field should decrease.

Below program illustrates the Date stepDown property :

Example: Decrementing the value of a date field by 2 days.

<!DOCTYPE html>
      Input Date stepDown Property in HTML
        h1 {
            color: green;
        h2 {
            font-family: Impact;
        body {
            text-align: center;
    <h2>Input Date stepDown Property
    <input type="date" 
    <p>To decrease the step, 
      double click the "Decrease Step" button.
    <button ondblclick="My_Date()">
      Decrease Step
    <p id="test">
        function My_Date() {
            // Decrease 2 days.


After clicking the button

Supported Browsers:

  • Apple Safari
  • Internet Explorer
  • Firefox
  • Google Chrome
  • Opera

Attention reader! Don’t stop learning now. Get hold of all the important HTML concepts with the Web Design for Beginners | HTML  course.

My Personal Notes arrow_drop_up
Recommended Articles
Page :