I am using a standard jQuery Datepicker and I need to modify it to display legend on the bottom. When I use beforeShow event, I cant append legend html to datepicker because there is no #ui-datepicker-div element, and datepicker does not supply afterShow event. This is my code:
var html = $('#datepickerLegendHolder').html();
$('#start_date.datepicker').datepicker({
"dateFormat": 'yy-mm-dd',
minDate: 0,
showOn: "both",
buttonImage: "/images/calendar-icon.png",
maxDate: "+2Y",
beforeShow: function(event, ui) {
$('#ui-datepicker-div').append(html);
},
onSelect: function (dateValue, inst) {
$('#end_date.datepicker').datepicker("option", "minDate", dateValue);
displayButtons();
}
});
Have anyone some alternative? Tnx