Change copying of Date values to avoid wrapping of date (#13269)

The error occurs only when current day is in the end of the month and
the textfield has no value when choosing months in the CalendarPanel.
This can not be sensibly tested by automated tests as it would require
setting the server time to a date that would trigger the problem (for
example 30.1). The error does not occur if the value is set before
setting the resolution (by the user or programmatically).

Change-Id: I6b3e5b699a773bd84b0f756d0c53698a09854a81