fix problem with date object constructor in firefox

Firefox has a problem when creating new date objects from existing date objects - at least if date is 0100-01-01. nextMonth will become 2000-01-01 so Firefox renders slightly more than 6 weeks (actually freezes). valueOf() solves the issue:

var nextMonth = new Date(prevMonth.valueOf());

----

It's not easily possible to write a test-case for this, if this is not actually run in firefox. However, this issue is reproducable in firefox, add an input field with value set to `01.01.100`. Opening this page in firefox crashes it. After applying this fix, everything works fine.