Custom title on multi-select calendar with counter?

I’m displaying a calendar inline and I’d like to display both a title (headerText), and a counter. However, I’d like to combine them and I’m not sure if that’s possible.

Ideally I’d display a title when the calendar is first displayed that says “Use the calendar to select your days” and then as the user selects days, that title is replaced by the counter. Is there anyway to customize the calendar title like this?

Hi Vincent,

I created you an example for your use case:

headerText: 'Use the calendar to select your days',
onSetDate: function (event, inst) {
    var nr = inst.getVal().length;

    if (nr > 0) {
        inst.settings.headerText = nr + ' selected'
    } else {
        inst.settings.headerText = 'Use the calendar to select your days'