Ticket #5385: javascript-dates.diff

File javascript-dates.diff, 892 bytes (added by Petr Marhoun <petr.marhoun@…>, 17 years ago)
  • django/contrib/admin/media/js/admin/DateTimeShortcuts.js

    === modified file 'django/contrib/admin/media/js/admin/DateTimeShortcuts.js'
     
    223223        DateTimeShortcuts.calendars[num].drawNextMonth();
    224224    },
    225225    handleCalendarCallback: function(num) {
    226         return "function(y, m, d) { DateTimeShortcuts.calendarInputs["+num+"].value = y+'-'+m+'-'+d; document.getElementById(DateTimeShortcuts.calendarDivName1+"+num+").style.display='none';}";
     226        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';}";
    227227    },
    228228    handleCalendarQuickLink: function(num, offset) {
    229229       var d = new Date();
Back to Top