component/calendar — pull request #27 by pirxpilot (2013-05-31 18:20:19+00:00)
Title: Fix short months selection on 31th of the month

Due to javascript date peculiarities calendar did not work properly on
the last day of long months (for example on 5/31)

`onclick` handler looked (more or less) like this

date = new Date;
date.setYear(year);
date.setMonth(month);
date.setDay(day);

However if current date is 2013-05-31 trying to set month to - for
example - September, would temporarily create an invalid date
(2013-09-31) which `Date` object promptly 'fixes' for us converting it to
2013-10-01

New code sets year, month, and day in the `Date` constructor thus avoiding
the issue.