1
0
mirror of https://github.com/django/django.git synced 2025-10-26 07:06:08 +00:00

Fixed #24980 -- Fixed day determination in admin calendar widget.

This commit is contained in:
Alexander Gaevsky
2015-12-27 01:32:28 +02:00
committed by Tim Graham
parent b5f8c81ce1
commit 44930cc466
4 changed files with 55 additions and 4 deletions

View File

@@ -240,7 +240,10 @@ function findPosY(obj) {
}
++i;
}
return new Date(year, month, day);
// Create Date object from UTC since the parsed value is supposed to be
// in UTC, not local time. Also, the calendar uses UTC functions for
// date extraction.
return new Date(Date.UTC(year, month, day));
};
})();