Closed brunoMachado92 closed 6 years ago
i found a workarround for this:
picker.on({ set: function(thingSet) { if(thingSet['clear']===null) picker.set('highlight', ...); } })
still, i think it would be a nice option
Its a shame that there is no onClear event handler, would make things so much easier. Still, thankful for the plugin, dont get me wrong :). What i did was:
$('.picker__button--clear').on('click', function(e) { var elementId = $(this).attr("aria-controls"); var aData = $('#'+elementId).data(); aData[elementId] = ''; // Ajax call ... });
Caveat: had to re add the event handler every time i clicked the clear button, not sure why, probably the plugin unbinds events. Hope it helps someone.
Hello,
On clear, i need to set the highlight date to today's date for the user when opens the calendar next time see today's date selected.
There is any event called OnClear? If not, whats the workarround for this ?
Cheers!