Trigger jQuery DatePicker with Image Button example

In the below code snippet in the document ready event handler of jQuery simple datepicker has been applied to HTML input textbox txtDate. In the jQuery UI Datepicker function the below three properties have been specified.
  • showOn – The trigger type here button as we want to display Image Icon
  • buttonImageOnly – Since we want to display image icon, this property needs to be set to true
  • buttonImage - URL of the image icon

<script src="" type = "text/javascript"></script>
<script src="" type = "text/javascript"></script>
<link href="" rel = "Stylesheet" type="text/css" /> 
<script type = "text/javascript">
    $(function () {
            showOn: 'button',
            buttonImageOnly: true,
            buttonImage: ''
<input type = "text" id = "txtDate" />

Related Post

Latest Post

Recent Posts Widget

Make sure to never miss a thing...

Get the latest news from the creative industry along with other creative goodies, conveniently delivered to social media.