We’ve Updated
QuestionHub 2.0 has been launched!
Click here to read about our changes!
QuestionHub is a one-stop shop for finding all things Q&A online. Use QuestionHub as a starting point when searching for answers online!
<script type="text/javascript">
$(document).ready(function() {
$("#DateFrom").datepicker({ showOn: 'button', buttonImageOnly: true, buttonImage: 'images/ui-icon-calendar.png' });
});
</script>
<span class="ui-icon ui-icon-calendar"></span>
http://stackoverflow.com/questions/802379/use-jquery-ui-datepicker-wit h-icons-from-jquery-ui-theme
$(document).ready(function() {
// your code here
});
. By default, the Datepicker plugin uses the specified buttonImage<img title="..." alt="..." src="images/ui-icon-calendar.png" class="ui-datepicker-trigger">
... $(function() {
// your code here
});
$("#DateFrom").datepicker({ showOn: 'button'}).next('button').text('').button({icons:{primary : 'ui-icon-calendar'}});
well.
input.date_picker {
text-align: center;
background-image: url("images/ui-icon-calendar.png");
background-position: right center;
background-repeat: no-repeat;
padding-right: 18px;
width: 78px;
}
a trigger manually span.date-picker-icon
{
display: inline-block;
z-index: -1;
position: relative;
left: -16px;
}
button.date-picker-button-hidden
{
opacity: 0.0;
filter: alpha(opacity=0);
height: 16px;
width: 16px;
margin: 0;
padding: 0;
}
this in FF10, but I can't see why it wouldn't work in other browsers. $('.date-picker').datepicker({showOn: 'button'})
.next('button').addClass('date-picker-button-hidden')
.after($('<span/>')
.addClass('ui-icon').addClass('ui-icon-calendar').addClass('date-picker-icon'));
button click event. Related Questions
Visit Yahoo! Answers
Programming & Design - 1,137 days ago - 0 Answers