Skip to content

Instantly share code, notes, and snippets.

@greghelton
Created February 23, 2012 05:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save greghelton/1890397 to your computer and use it in GitHub Desktop.
Save greghelton/1890397 to your computer and use it in GitHub Desktop.
A working example of jQuery UI Datepicker, you supply the image file
<html>
<head>
<link rel="stylesheet" type="text/css" media="screen"
href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.7.1/themes/ui-lightness/jquery-ui.css" />
</head>
<body>
<p>Date: <input id=fromdt type=text></p>
<div style="display: none" class=demo-description></div>
<p>Date: <input id=todate type=text></p>
<div style="display: none" class=demo-description></div>
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.16/jquery-ui.min.js"></script>
<script>
$(function() {$( "#fromdt" ).datepicker({ buttonImage: 'images/calendar-small.png', buttonImageOnly: true, showOn: 'button' });});
$(function() {$( "#todate" ).datepicker({ buttonImage: 'images/calendar-small.png', buttonImageOnly: true, showOn: 'button' });});
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment