How to call/bind a jquery datepicker to a image/label/div instead of an input field

JScript:
$('document').ready(function(){
$('#check_in_date').datepicker({
dateFormat: 'yy-mm-dd'
});


$('#check_in_date_img').click(function(){
$('#check_in_date').focus();
});

});

Markup:
<.. img src="date.gif" alt="Date" id="check_in_date_img" ..>

<..input type="text" id="check_in_date"..>

No comments:

Post a Comment