Fix selected date when time picker goes over the midnight.

When both date and time picker are used and time is changed over the midnight, old date is still selected - http://jsfiddle.net/G3mfH/.