jQuery UI date picker should do the job.
Check out the example using an icon to trigger the picker:
http://jqueryui.com/demos/datepicker/#icon-trigger
You can also call the show() method to drop down the picker whenever you need to, e.g...
$('#mypicker').datepicker({
//options
minDate: '20.04.2012'
//...
});
$('#mylink').click(function(){
$('#mypicker').datepicker('show');
});
To change the link text after a date is selected, use something like this in initialization code:
$('#mypicker').datepicker({ onSelect:
function(dateText, inst) {
$('#mylink').text(dateText);
}
});
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…