Skip to content
Related Articles

Related Articles

How to create a Datetime Input using jQuery Mobile ?

View Discussion
Improve Article
Save Article
  • Last Updated : 16 Dec, 2020

jQuery Mobile is a web based technology used to make responsive content that can be accessed on all smartphones, tablets, and desktops. In this article, we will be creating a Datetime input area using jQuery Mobile.

Approach: Add jQuery mobile scripts needed for your project.

<link rel=”stylesheet” href=”” />
<script src=””></script>
<script src=””></script>

Example: We will create a Datetime Input Area using jQuery Mobile. We use type=”datetime” attribute to set the datetime.


<!DOCTYPE html>
    <link rel="stylesheet" href=
    <script src=
    <script src=
            Design a Datetime Input using jQuery Mobile
        <form style="width: 50%;">
            <label for="datetimeInput1">Datetime Input Area:</label>
            <input type="datetime" data-clear-btn="false" 
                name="datetimeInput1" id="datetimeInput1" value="">
            <label for="datetimeInput2">
                Datetime Input Area with Clear Button:
            <input type="datetime" data-clear-btn="true" 
                name="datetimeInput2" id="datetimeInput2" value="">
            <label for="datetimeInput3">
                Datetime-local Input Area:
            <input type="datetime-local" data-clear-btn="false" 
                name="datetimeInput3" id="datetimeInput3" value="">
            <label for="datetimeInput14">
                Datetime-local Input Area with Clear Button:
            <input type="datetime-local" data-clear-btn="true" 
                name="datetimeInput4" id="datetimeInput4" value="">


My Personal Notes arrow_drop_up
Recommended Articles
Page :

Start Your Coding Journey Now!