This is on the one that pops up when you click the linked input element. I want to be able to insert some static text underneath the table of dates that will appear and stay
To get around your "hacky" setTimeout workaround, you can attach click event handlers to the prev and next buttons. Here's code adapted from Martin's answer.
$(function() {
function appendText(text) {
$('.ui-datepicker-calendar').after(''+lastText+'>');
}
function addClickHandlers() {
$('.ui-datepicker-prev, .ui-datepicker-next')
.on('click', function() {
addClickHandlers();
appendText();
});
}
var lastText;
$( ".datepicker" ).datepicker()
.on( "click", function() {
lastText = $( this ).data('dptxt');
appendText();
addClickHandlers();
});
});