Skip to content
Related Articles

Related Articles

Improve Article
HTML | DOM Input DatetimeLocal stepDown() Method
  • Difficulty Level : Basic
  • Last Updated : 01 Mar, 2019

The Input DatetimeLocal stepDown() method in HTML DOM is used to decrements the value of the Local datetime field by a specified number. It can only be used on the Minutes. Years, months, days, hours, seconds or milliseconds are not affected by the stepDown() method.



Parameters: It contains single parameter number which is used to specify the amount of minutes the local datetime field should decrease.

Below program illustrates the DatetimeLocal stepDown method in HTML DOM:

Example: This example use stepDown() method to decrease the value of minutes by 2.

<!DOCTYPE html>
        Input DatetimeLocal stepDown() Method
<body style="text-align:center;">
    <h1 style="color:green;">
    <h2 style="font-family: Impact;">
        Input DatetimeLocal stepDown() Method
    <input type="datetime-local" id="test_DatetimeLocal">
        To decrease the value of the datetimeLocal field
        by 2minutes, double click the "Update" button.
    <button ondblclick="My_DatetimeLocal()">
    <!-- Script to use stepDown() method -->
        function My_DatetimeLocal() {


After clicking the button

Supported Browsers: The browser supported by Input DatetimeLocal stepDown() method are listed below:

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

My Personal Notes arrow_drop_up
Recommended Articles
Page :