Skip to content
Related Articles

Related Articles

Improve Article
Save Article
Like Article

jQuery UI Datepicker showOn Option

  • Last Updated : 22 Feb, 2021

jQuery UI consists of GUI widgets, visual effects, and themes implemented using jQuery, CSS, and HTML. jQuery UI is great for building UI interfaces for the webpages. jQueryUI Datepickers widget in jQuery UI allows users to enter dates easily and visually. In this article we will see how to use showOn option in jQuery UI Datepicker. The showOn option specifies when the datepicker should appear in the jQuery UI Datepicker.


   { showOn: "focus"}

CDN Link:

First, add jQuery UI scripts needed for your project.

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

Example 1:


<!DOCTYPE html>
<html lang="en">
    <meta charset="utf-8" />
    <link href=
    <script src=
    <script src=
    <!-- Javascript -->
      $(function () {
        $("#gfg").datepicker({ buttonText: "choose", showOn: "button" });
  <h3>jQuery UI | datepicker buttonText option</h3>
    <!-- HTML -->
    <p>Enter Date: <input type="text" id="gfg" /></p>



My Personal Notes arrow_drop_up
Recommended Articles
Page :

Start Your Coding Journey Now!