kylestetz/CLNDR — pull request #35 by Ahrengot (2013-10-25 17:01:45+00:00)
Title: Re-render calendar before calling onMonthChange() / onYearChange()

Hey again Kyle,

I was building a data selector where the selected date would be moved to the next/previous month as a user goes back or forward in time. For instance a user could have selected July 17th. If he presses next month, August 17th would automatically be selected after the calendar re-renders.

The problem is that `this.render()` is called _after_ `this.options.clickEvents.onMonthChange()` so in the callback, the new HTML markup isn't available yet.

I changed it, so that render is invoked before any callbacks. I couldn't imagine any use case where this wasn't the functionality you'd want. Did I overlook something?

I also changed it so that the `grunt` command no longer outputs compressed CSS