Add calendar jquery image to datepicker
73,456
Solution 1
<script>
$(function() {
$( "#datepicker" ).datepicker({
showOn: "button",
buttonImage: "http://jqueryui.com/resources/demos/datepicker/images/calendar.gif",
buttonImageOnly: true
});
});
</script>
Solution 2
If you click the view source button below the example you linked to, you'll see something like this:
$('#field').datepicker({
buttonImage: '/images/calendar_icon.png'
});
Author by
user525146
Updated on August 19, 2020Comments
-
user525146 over 3 years
I am not sure how to add the
ui-icon ui-icon-calendar
class as a datepicker image beside the text field. I want something like this: http://jqueryui.com/demos/datepicker/#icon-trigger, but it should have the jquery calendar image.