Edit field with invalid date


I’ve found a bug in this.contDates.onclick.

If the field contains an invalid date, after a click, with this code :

var t1 = that._activeDate.getHours();
var t2 = that._activeDate.getMinutes();

t1 = isNaN and t2 = isNaN.And after, when I execute

that._activeDate = new Date(t._date.getFullYear(),t._date.getMonth(),t._date.getDate(),t1,t2);

that._activeDate = Date{invalidDate}.

So I’ve added, just after definition of t1 and t2 :

if (isNaN(t1)) {
    t1 = 0;
if (isNaN(t2)) {
    t2 = 0;

And now I can change the field value despite the invalid value of origin.

How to reproduce a problem?
What it is necessary to do to repeat it?