Fixed #5385 -- Made the date returned from the calendar picker consistent with the usual format of dates in the admin. Thanks Petr Marhoun for the ticket and patch.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@8390 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Brian Rosner 2008-08-15 19:51:45 +00:00
parent 4cfa5afcc7
commit 9d1ec0b5ec
1 changed files with 1 additions and 1 deletions

View File

@ -236,7 +236,7 @@ var DateTimeShortcuts = {
DateTimeShortcuts.calendars[num].drawNextMonth();
},
handleCalendarCallback: function(num) {
return "function(y, m, d) { DateTimeShortcuts.calendarInputs["+num+"].value = y+'-'+m+'-'+d; document.getElementById(DateTimeShortcuts.calendarDivName1+"+num+").style.display='none';}";
return "function(y, m, d) { DateTimeShortcuts.calendarInputs["+num+"].value = y+'-'+(m<10?'0':'')+m+'-'+(d<10?'0':'')+d; document.getElementById(DateTimeShortcuts.calendarDivName1+"+num+").style.display='none';}";
},
handleCalendarQuickLink: function(num, offset) {
var d = new Date();