fix(datepicker): correctly change view month when last day of month is selected

When the selected date corresponds to a day that doesn't exist in the next/previous month, the month change would not work correctly - either it would skip a month forward or it would not change to the previous month. This was caused by javascript date values rollover when changing month part of date because months have a different number of days.
This fix uses the first day of the month in the calculations to avoid the rollover.