Use JQuery UI Datepicker with Icons from Jquery UI Theme
Posted
by
Craig McGuff
on Stack Overflow
See other posts from Stack Overflow
or by Craig McGuff
Published on 2009-04-29T13:32:40Z
Indexed on
2011/01/05
9:54 UTC
Read the original article
Hit count: 834
I have a datepicker control setup using the JQuery UI, I am also using the JQuery UI themes which provide a bunch of default icons that I want to use.
The DatePicker allows for specifying a specific image, i.e.:
<script type="text/javascript">
$(document).ready(function() {
$("#DateFrom").datepicker({ showOn: 'button', buttonImageOnly: true, buttonImage: 'images/ui-icon-calendar.png' });
});
</script>
To display an icon from the icon set you use something like:
<span class="ui-icon ui-icon-calendar"></span>
Is there an easy to integrate the two or do I just need to hack out the styles/images manually?
© Stack Overflow or respective owner