diff --git a/django/contrib/admin/static/admin/css/widgets.css b/django/contrib/admin/static/admin/css/widgets.css
index 2989f2f..5ea723b 100644
--- a/django/contrib/admin/static/admin/css/widgets.css
+++ b/django/contrib/admin/static/admin/css/widgets.css
@@ -377,7 +377,8 @@ span.clearable-file-input label {
     right: 0;
 }
 
-.calendar-cancel {
+.calendar-cancel,
+.clock-cancel {
     margin: 0 !important;
     padding: 0 !important;
     font-size: 10px;
diff --git a/django/contrib/admin/static/admin/js/admin/DateTimeShortcuts.js b/django/contrib/admin/static/admin/js/admin/DateTimeShortcuts.js
deleted file mode 100644
index 3ecc06f..0000000
--- a/django/contrib/admin/static/admin/js/admin/DateTimeShortcuts.js
+++ /dev/null
@@ -1,288 +0,0 @@
-// Inserts shortcut buttons after all of the following:
-//     <input type="text" class="vDateField">
-//     <input type="text" class="vTimeField">
-
-var DateTimeShortcuts = {
-    calendars: [],
-    calendarInputs: [],
-    clockInputs: [],
-    calendarDivName1: 'calendarbox', // name of calendar <div> that gets toggled
-    calendarDivName2: 'calendarin',  // name of <div> that contains calendar
-    calendarLinkName: 'calendarlink',// name of the link that is used to toggle
-    clockDivName: 'clockbox',        // name of clock <div> that gets toggled
-    clockLinkName: 'clocklink',      // name of the link that is used to toggle
-    shortCutsClass: 'datetimeshortcuts', // class of the clock and cal shortcuts
-    admin_media_prefix: '',
-    init: function() {
-        // Get admin_media_prefix by grabbing it off the window object. It's
-        // set in the admin/base.html template, so if it's not there, someone's
-        // overridden the template. In that case, we'll set a clearly-invalid
-        // value in the hopes that someone will examine HTTP requests and see it.
-        if (window.__admin_media_prefix__ != undefined) {
-            DateTimeShortcuts.admin_media_prefix = window.__admin_media_prefix__;
-        } else {
-            DateTimeShortcuts.admin_media_prefix = '/missing-admin-media-prefix/';
-        }
-
-        var inputs = document.getElementsByTagName('input');
-        for (i=0; i<inputs.length; i++) {
-            var inp = inputs[i];
-            if (inp.getAttribute('type') == 'text' && inp.className.match(/vTimeField/)) {
-                DateTimeShortcuts.addClock(inp);
-            }
-            else if (inp.getAttribute('type') == 'text' && inp.className.match(/vDateField/)) {
-                DateTimeShortcuts.addCalendar(inp);
-            }
-        }
-    },
-    // Add clock widget to a given field
-    addClock: function(inp) {
-        var num = DateTimeShortcuts.clockInputs.length;
-        DateTimeShortcuts.clockInputs[num] = inp;
-
-        // Shortcut links (clock icon and "Now" link)
-        var shortcuts_span = document.createElement('span');
-        shortcuts_span.className = DateTimeShortcuts.shortCutsClass;
-        inp.parentNode.insertBefore(shortcuts_span, inp.nextSibling);
-        var now_link = document.createElement('a');
-        now_link.setAttribute('href', "javascript:DateTimeShortcuts.handleClockQuicklink(" + num + ", new Date().strftime('" + get_format('TIME_INPUT_FORMATS')[0] + "'));");
-        now_link.appendChild(document.createTextNode(gettext('Now')));
-        var clock_link = document.createElement('a');
-        clock_link.setAttribute('href', 'javascript:DateTimeShortcuts.openClock(' + num + ');');
-        clock_link.id = DateTimeShortcuts.clockLinkName + num;
-        quickElement('img', clock_link, '', 'src', DateTimeShortcuts.admin_media_prefix + 'img/icon_clock.gif', 'alt', gettext('Clock'));
-        shortcuts_span.appendChild(document.createTextNode('\240'));
-        shortcuts_span.appendChild(now_link);
-        shortcuts_span.appendChild(document.createTextNode('\240|\240'));
-        shortcuts_span.appendChild(clock_link);
-
-        // Create clock link div
-        //
-        // Markup looks like:
-        // <div id="clockbox1" class="clockbox module">
-        //     <h2>Choose a time</h2>
-        //     <ul class="timelist">
-        //         <li><a href="#">Now</a></li>
-        //         <li><a href="#">Midnight</a></li>
-        //         <li><a href="#">6 a.m.</a></li>
-        //         <li><a href="#">Noon</a></li>
-        //     </ul>
-        //     <p class="calendar-cancel"><a href="#">Cancel</a></p>
-        // </div>
-
-        var clock_box = document.createElement('div');
-        clock_box.style.display = 'none';
-        clock_box.style.position = 'absolute';
-        clock_box.className = 'clockbox module';
-        clock_box.setAttribute('id', DateTimeShortcuts.clockDivName + num);
-        document.body.appendChild(clock_box);
-        addEvent(clock_box, 'click', DateTimeShortcuts.cancelEventPropagation);
-
-        quickElement('h2', clock_box, gettext('Choose a time'));
-        var time_list = quickElement('ul', clock_box, '');
-        time_list.className = 'timelist';
-        var time_format = get_format('TIME_INPUT_FORMATS')[0];
-        quickElement("a", quickElement("li", time_list, ""), gettext("Now"), "href", "javascript:DateTimeShortcuts.handleClockQuicklink(" + num + ", new Date().strftime('" + time_format + "'));");
-        quickElement("a", quickElement("li", time_list, ""), gettext("Midnight"), "href", "javascript:DateTimeShortcuts.handleClockQuicklink(" + num + ", new Date(1970,1,1,0,0,0,0).strftime('" + time_format + "'));");
-        quickElement("a", quickElement("li", time_list, ""), gettext("6 a.m."), "href", "javascript:DateTimeShortcuts.handleClockQuicklink(" + num + ", new Date(1970,1,1,6,0,0,0).strftime('" + time_format + "'));");
-        quickElement("a", quickElement("li", time_list, ""), gettext("Noon"), "href", "javascript:DateTimeShortcuts.handleClockQuicklink(" + num + ", new Date(1970,1,1,12,0,0,0).strftime('" + time_format + "'));");
-
-        var cancel_p = quickElement('p', clock_box, '');
-        cancel_p.className = 'calendar-cancel';
-        quickElement('a', cancel_p, gettext('Cancel'), 'href', 'javascript:DateTimeShortcuts.dismissClock(' + num + ');');
-        django.jQuery(document).bind('keyup', function(event) {
-            if (event.which == 27) {
-                // ESC key closes popup
-                DateTimeShortcuts.dismissClock(num);
-                event.preventDefault();
-            }
-        });
-    },
-    openClock: function(num) {
-        var clock_box = document.getElementById(DateTimeShortcuts.clockDivName+num)
-        var clock_link = document.getElementById(DateTimeShortcuts.clockLinkName+num)
-
-        // Recalculate the clockbox position
-        // is it left-to-right or right-to-left layout ?
-        if (getStyle(document.body,'direction')!='rtl') {
-            clock_box.style.left = findPosX(clock_link) + 17 + 'px';
-        }
-        else {
-            // since style's width is in em, it'd be tough to calculate
-            // px value of it. let's use an estimated px for now
-            // TODO: IE returns wrong value for findPosX when in rtl mode
-            //       (it returns as it was left aligned), needs to be fixed.
-            clock_box.style.left = findPosX(clock_link) - 110 + 'px';
-        }
-        clock_box.style.top = Math.max(0, findPosY(clock_link) - 30) + 'px';
-
-        // Show the clock box
-        clock_box.style.display = 'block';
-        addEvent(window.document, 'click', function() { DateTimeShortcuts.dismissClock(num); return true; });
-    },
-    dismissClock: function(num) {
-       document.getElementById(DateTimeShortcuts.clockDivName + num).style.display = 'none';
-       window.document.onclick = null;
-    },
-    handleClockQuicklink: function(num, val) {
-       DateTimeShortcuts.clockInputs[num].value = val;
-       DateTimeShortcuts.clockInputs[num].focus();
-       DateTimeShortcuts.dismissClock(num);
-    },
-    // Add calendar widget to a given field.
-    addCalendar: function(inp) {
-        var num = DateTimeShortcuts.calendars.length;
-
-        DateTimeShortcuts.calendarInputs[num] = inp;
-
-        // Shortcut links (calendar icon and "Today" link)
-        var shortcuts_span = document.createElement('span');
-        shortcuts_span.className = DateTimeShortcuts.shortCutsClass;
-        inp.parentNode.insertBefore(shortcuts_span, inp.nextSibling);
-        var today_link = document.createElement('a');
-        today_link.setAttribute('href', 'javascript:DateTimeShortcuts.handleCalendarQuickLink(' + num + ', 0);');
-        today_link.appendChild(document.createTextNode(gettext('Today')));
-        var cal_link = document.createElement('a');
-        cal_link.setAttribute('href', 'javascript:DateTimeShortcuts.openCalendar(' + num + ');');
-        cal_link.id = DateTimeShortcuts.calendarLinkName + num;
-        quickElement('img', cal_link, '', 'src', DateTimeShortcuts.admin_media_prefix + 'img/icon_calendar.gif', 'alt', gettext('Calendar'));
-        shortcuts_span.appendChild(document.createTextNode('\240'));
-        shortcuts_span.appendChild(today_link);
-        shortcuts_span.appendChild(document.createTextNode('\240|\240'));
-        shortcuts_span.appendChild(cal_link);
-
-        // Create calendarbox div.
-        //
-        // Markup looks like:
-        //
-        // <div id="calendarbox3" class="calendarbox module">
-        //     <h2>
-        //           <a href="#" class="link-previous">&lsaquo;</a>
-        //           <a href="#" class="link-next">&rsaquo;</a> February 2003
-        //     </h2>
-        //     <div class="calendar" id="calendarin3">
-        //         <!-- (cal) -->
-        //     </div>
-        //     <div class="calendar-shortcuts">
-        //          <a href="#">Yesterday</a> | <a href="#">Today</a> | <a href="#">Tomorrow</a>
-        //     </div>
-        //     <p class="calendar-cancel"><a href="#">Cancel</a></p>
-        // </div>
-        var cal_box = document.createElement('div');
-        cal_box.style.display = 'none';
-        cal_box.style.position = 'absolute';
-        cal_box.className = 'calendarbox module';
-        cal_box.setAttribute('id', DateTimeShortcuts.calendarDivName1 + num);
-        document.body.appendChild(cal_box);
-        addEvent(cal_box, 'click', DateTimeShortcuts.cancelEventPropagation);
-
-        // next-prev links
-        var cal_nav = quickElement('div', cal_box, '');
-        var cal_nav_prev = quickElement('a', cal_nav, '<', 'href', 'javascript:DateTimeShortcuts.drawPrev('+num+');');
-        cal_nav_prev.className = 'calendarnav-previous';
-        var cal_nav_next = quickElement('a', cal_nav, '>', 'href', 'javascript:DateTimeShortcuts.drawNext('+num+');');
-        cal_nav_next.className = 'calendarnav-next';
-
-        // main box
-        var cal_main = quickElement('div', cal_box, '', 'id', DateTimeShortcuts.calendarDivName2 + num);
-        cal_main.className = 'calendar';
-        DateTimeShortcuts.calendars[num] = new Calendar(DateTimeShortcuts.calendarDivName2 + num, DateTimeShortcuts.handleCalendarCallback(num));
-        DateTimeShortcuts.calendars[num].drawCurrent();
-
-        // calendar shortcuts
-        var shortcuts = quickElement('div', cal_box, '');
-        shortcuts.className = 'calendar-shortcuts';
-        quickElement('a', shortcuts, gettext('Yesterday'), 'href', 'javascript:DateTimeShortcuts.handleCalendarQuickLink(' + num + ', -1);');
-        shortcuts.appendChild(document.createTextNode('\240|\240'));
-        quickElement('a', shortcuts, gettext('Today'), 'href', 'javascript:DateTimeShortcuts.handleCalendarQuickLink(' + num + ', 0);');
-        shortcuts.appendChild(document.createTextNode('\240|\240'));
-        quickElement('a', shortcuts, gettext('Tomorrow'), 'href', 'javascript:DateTimeShortcuts.handleCalendarQuickLink(' + num + ', +1);');
-
-        // cancel bar
-        var cancel_p = quickElement('p', cal_box, '');
-        cancel_p.className = 'calendar-cancel';
-        quickElement('a', cancel_p, gettext('Cancel'), 'href', 'javascript:DateTimeShortcuts.dismissCalendar(' + num + ');');
-        django.jQuery(document).bind('keyup', function(event) {
-            if (event.which == 27) {
-                // ESC key closes popup
-                DateTimeShortcuts.dismissCalendar(num);
-                event.preventDefault();
-            }
-        });
-    },
-    openCalendar: function(num) {
-        var cal_box = document.getElementById(DateTimeShortcuts.calendarDivName1+num)
-        var cal_link = document.getElementById(DateTimeShortcuts.calendarLinkName+num)
-        var inp = DateTimeShortcuts.calendarInputs[num];
-
-        // Determine if the current value in the input has a valid date.
-        // If so, draw the calendar with that date's year and month.
-        if (inp.value) {
-            var date_parts = inp.value.split('-');
-            var year = date_parts[0];
-            var month = parseFloat(date_parts[1]);
-            if (year.match(/\d\d\d\d/) && month >= 1 && month <= 12) {
-                DateTimeShortcuts.calendars[num].drawDate(month, year);
-            }
-        }
-
-        // Recalculate the clockbox position
-        // is it left-to-right or right-to-left layout ?
-        if (getStyle(document.body,'direction')!='rtl') {
-            cal_box.style.left = findPosX(cal_link) + 17 + 'px';
-        }
-        else {
-            // since style's width is in em, it'd be tough to calculate
-            // px value of it. let's use an estimated px for now
-            // TODO: IE returns wrong value for findPosX when in rtl mode
-            //       (it returns as it was left aligned), needs to be fixed.
-            cal_box.style.left = findPosX(cal_link) - 180 + 'px';
-        }
-        cal_box.style.top = Math.max(0, findPosY(cal_link) - 75) + 'px';
-
-        cal_box.style.display = 'block';
-        addEvent(window.document, 'click', function() { DateTimeShortcuts.dismissCalendar(num); return true; });
-    },
-    dismissCalendar: function(num) {
-        document.getElementById(DateTimeShortcuts.calendarDivName1+num).style.display = 'none';
-        window.document.onclick = null;
-    },
-    drawPrev: function(num) {
-        DateTimeShortcuts.calendars[num].drawPreviousMonth();
-    },
-    drawNext: function(num) {
-        DateTimeShortcuts.calendars[num].drawNextMonth();
-    },
-    handleCalendarCallback: function(num) {
-        format = get_format('DATE_INPUT_FORMATS')[0];
-        // the format needs to be escaped a little
-        format = format.replace('\\', '\\\\');
-        format = format.replace('\r', '\\r');
-        format = format.replace('\n', '\\n');
-        format = format.replace('\t', '\\t');
-        format = format.replace("'", "\\'");
-        return ["function(y, m, d) { DateTimeShortcuts.calendarInputs[",
-               num,
-               "].value = new Date(y, m-1, d).strftime('",
-               format,
-               "');DateTimeShortcuts.calendarInputs[",
-               num,
-               "].focus();document.getElementById(DateTimeShortcuts.calendarDivName1+",
-               num,
-               ").style.display='none';}"].join('');
-    },
-    handleCalendarQuickLink: function(num, offset) {
-       var d = new Date();
-       d.setDate(d.getDate() + offset)
-       DateTimeShortcuts.calendarInputs[num].value = d.strftime(get_format('DATE_INPUT_FORMATS')[0]);
-       DateTimeShortcuts.calendarInputs[num].focus();
-       DateTimeShortcuts.dismissCalendar(num);
-    },
-    cancelEventPropagation: function(e) {
-        if (!e) e = window.event;
-        e.cancelBubble = true;
-        if (e.stopPropagation) e.stopPropagation();
-    }
-}
-
-addEvent(window, 'load', DateTimeShortcuts.init);
diff --git a/django/contrib/admin/static/admin/js/calendar.js b/django/contrib/admin/static/admin/js/calendar.js
deleted file mode 100644
index c95a95d..0000000
--- a/django/contrib/admin/static/admin/js/calendar.js
+++ /dev/null
@@ -1,156 +0,0 @@
-/*
-calendar.js - Calendar functions by Adrian Holovaty
-*/
-
-function removeChildren(a) { // "a" is reference to an object
-    while (a.hasChildNodes()) a.removeChild(a.lastChild);
-}
-
-// quickElement(tagType, parentReference, textInChildNode, [, attribute, attributeValue ...]);
-function quickElement() {
-    var obj = document.createElement(arguments[0]);
-    if (arguments[2] != '' && arguments[2] != null) {
-        var textNode = document.createTextNode(arguments[2]);
-        obj.appendChild(textNode);
-    }
-    var len = arguments.length;
-    for (var i = 3; i < len; i += 2) {
-        obj.setAttribute(arguments[i], arguments[i+1]);
-    }
-    arguments[1].appendChild(obj);
-    return obj;
-}
-
-// CalendarNamespace -- Provides a collection of HTML calendar-related helper functions
-var CalendarNamespace = {
-    monthsOfYear: gettext('January February March April May June July August September October November December').split(' '),
-    daysOfWeek: gettext('S M T W T F S').split(' '),
-    firstDayOfWeek: parseInt(get_format('FIRST_DAY_OF_WEEK')),
-    isLeapYear: function(year) {
-        return (((year % 4)==0) && ((year % 100)!=0) || ((year % 400)==0));
-    },
-    getDaysInMonth: function(month,year) {
-        var days;
-        if (month==1 || month==3 || month==5 || month==7 || month==8 || month==10 || month==12) {
-            days = 31;
-        }
-        else if (month==4 || month==6 || month==9 || month==11) {
-            days = 30;
-        }
-        else if (month==2 && CalendarNamespace.isLeapYear(year)) {
-            days = 29;
-        }
-        else {
-            days = 28;
-        }
-        return days;
-    },
-    draw: function(month, year, div_id, callback) { // month = 1-12, year = 1-9999
-        var today = new Date();
-        var todayDay = today.getDate();
-        var todayMonth = today.getMonth()+1;
-        var todayYear = today.getFullYear();
-        var todayClass = '';
-
-        month = parseInt(month);
-        year = parseInt(year);
-        var calDiv = document.getElementById(div_id);
-        removeChildren(calDiv);
-        var calTable = document.createElement('table');
-        quickElement('caption', calTable, CalendarNamespace.monthsOfYear[month-1] + ' ' + year);
-        var tableBody = quickElement('tbody', calTable);
-
-        // Draw days-of-week header
-        var tableRow = quickElement('tr', tableBody);
-        for (var i = 0; i < 7; i++) {
-            quickElement('th', tableRow, CalendarNamespace.daysOfWeek[(i + CalendarNamespace.firstDayOfWeek) % 7]);
-        }
-
-        var startingPos = new Date(year, month-1, 1 - CalendarNamespace.firstDayOfWeek).getDay();
-        var days = CalendarNamespace.getDaysInMonth(month, year);
-
-        // Draw blanks before first of month
-        tableRow = quickElement('tr', tableBody);
-        for (var i = 0; i < startingPos; i++) {
-            var _cell = quickElement('td', tableRow, ' ');
-            _cell.style.backgroundColor = '#f3f3f3';
-        }
-
-        // Draw days of month
-        var currentDay = 1;
-        for (var i = startingPos; currentDay <= days; i++) {
-            if (i%7 == 0 && currentDay != 1) {
-                tableRow = quickElement('tr', tableBody);
-            }
-            if ((currentDay==todayDay) && (month==todayMonth) && (year==todayYear)) {
-                todayClass='today';
-            } else {
-                todayClass='';
-            }
-            var cell = quickElement('td', tableRow, '', 'class', todayClass);
-
-            quickElement('a', cell, currentDay, 'href', 'javascript:void(' + callback + '('+year+','+month+','+currentDay+'));');
-            currentDay++;
-        }
-
-        // Draw blanks after end of month (optional, but makes for valid code)
-        while (tableRow.childNodes.length < 7) {
-            var _cell = quickElement('td', tableRow, ' ');
-            _cell.style.backgroundColor = '#f3f3f3';
-        }
-
-        calDiv.appendChild(calTable);
-    }
-}
-
-// Calendar -- A calendar instance
-function Calendar(div_id, callback) {
-    // div_id (string) is the ID of the element in which the calendar will
-    //     be displayed
-    // callback (string) is the name of a JavaScript function that will be
-    //     called with the parameters (year, month, day) when a day in the
-    //     calendar is clicked
-    this.div_id = div_id;
-    this.callback = callback;
-    this.today = new Date();
-    this.currentMonth = this.today.getMonth() + 1;
-    this.currentYear = this.today.getFullYear();
-}
-Calendar.prototype = {
-    drawCurrent: function() {
-        CalendarNamespace.draw(this.currentMonth, this.currentYear, this.div_id, this.callback);
-    },
-    drawDate: function(month, year) {
-        this.currentMonth = month;
-        this.currentYear = year;
-        this.drawCurrent();
-    },
-    drawPreviousMonth: function() {
-        if (this.currentMonth == 1) {
-            this.currentMonth = 12;
-            this.currentYear--;
-        }
-        else {
-            this.currentMonth--;
-        }
-        this.drawCurrent();
-    },
-    drawNextMonth: function() {
-        if (this.currentMonth == 12) {
-            this.currentMonth = 1;
-            this.currentYear++;
-        }
-        else {
-            this.currentMonth++;
-        }
-        this.drawCurrent();
-    },
-    drawPreviousYear: function() {
-        this.currentYear--;
-        this.drawCurrent();
-    },
-    drawNextYear: function() {
-        this.currentYear++;
-        this.drawCurrent();
-    }
-}
diff --git a/django/contrib/admin/static/admin/js/datetimeshortcuts.js b/django/contrib/admin/static/admin/js/datetimeshortcuts.js
new file mode 100644
index 0000000..d023c99
--- /dev/null
+++ b/django/contrib/admin/static/admin/js/datetimeshortcuts.js
@@ -0,0 +1,599 @@
+/**
+ * Django admin DateTime shortcuts
+ *
+ * @requires jQuery 1.4.2 or later
+ *
+ * DateTimeShortcuts
+ * -----------------
+ *
+ * Inserts shortcut buttons (clock and calendar) after all input:text fields
+ * having the classes .vDateField and .vTimeField.
+ *
+ * The $("selector").datetimeshortcuts() plugin is intended to be applied on
+ * fieldsets or whole forms which contain, or may later contain (inline
+ * fieldsets) date or time fields.
+ *
+ * All options as defined in datetimeshortcuts.defaults can be overwritten by
+ * passing them as array to the datetimeshortcuts() method.
+ *
+ */
+
+(function($) {
+
+    $.fn.datetimeshortcuts = function(options) {
+        // variables set in base.html
+        var datetimeshortcuts_defaults = $('body').data('datetimeshortcuts_defaults');
+
+        // extend default settings with user options
+        var o = $.extend({
+                admin_media_prefix: $('body').data('admin_media_prefix')
+            },
+            $.fn.datetimeshortcuts.defaults,
+            datetimeshortcuts_defaults,
+            options);
+
+        // Check admin_media_prefix setting:
+        // usually set in admin/base.html template, but if that was overridden,
+        // it might be missing. Set it to something clearly invalid so that
+        // somebody might notice it.
+        if (o.admin_media_prefix === undefined) {
+            o.admin_media_prefix = '/missing-admin-media-prefix/';
+        }
+
+
+        /* --- utitity functions ------------------------------------------- */
+
+        // month names
+        var month_names = gettext('January February March April May June July August September October November December').split(' ');
+
+        // weekday names
+        var weekdays = gettext('S M T W T F S').split(' ');
+
+        // first day of week
+        var first_day_of_week = parseInt(get_format('FIRST_DAY_OF_WEEK'), 10);
+
+        // find leap years
+        var is_leap_year = function(year) {
+            return new Date(year, 1, 29).getDate() == 29;
+        };
+
+        // number of days in month
+        var get_days_in_month = function(year, month) {
+            return 32 - new Date(year, month, 32).getDate();
+        };
+
+
+        /* --- initialization functions ------------------------------------ */
+
+        // add shortcuts for date fields
+        var add_calendar = function(element) {
+            // insert span.datetimeshortcuts
+            var shortcuts = $('<span class="'+o.class_shortcuts+'">').insertAfter(element);
+
+            // insert today link
+            if (o.enable_today) {
+                shortcuts.append(' <a href="#" class="'+o.class_today+'">'+gettext('Today')+'</a>');
+                if (o.enable_calendar) {
+                    shortcuts.append(" | ");
+                }
+            }
+
+            // insert calendar link
+            if (o.enable_calendar) {
+                $('<a href="#" class="'+o.class_calendar+'"></a>')
+                    .appendTo(shortcuts)
+                    .append('<img src="'+o.admin_media_prefix + 'img/icon_calendar.gif" alt="'+gettext('Calendar')+'" />');
+            }
+        };
+
+        // add shortcuts for time fields
+        var add_clock = function(element) {
+            // insert span.datetimeshortcuts
+            var shortcuts = $('<span class="'+o.class_shortcuts+'">').insertAfter(element);
+
+            // insert now link
+            if (o.enable_now) {
+                shortcuts.append(' <a href="#" class="'+o.class_now+'">'+gettext('Now')+'</a>');
+                if (o.enable_clock) {
+                    shortcuts.append(" | ");
+                }
+            }
+
+            // insert clock link
+            if (o.enable_clock) {
+                $('<a href="#" class="'+o.class_clock+'"></a>')
+                    .appendTo(shortcuts)
+                    .append('<img src="'+o.admin_media_prefix + 'img/icon_clock.gif" alt="'+gettext('Clock')+'" />');
+            }
+        };
+
+        // draw a month calendar table
+        var draw_calendar_table = function(selected, show) {
+            var y_sel, m_sel, d_sel;
+            // selected date (optional)
+            if (selected !== null) {
+                y_sel = selected.getFullYear();
+                m_sel = selected.getMonth();
+                d_sel = selected.getDate();
+            }
+            // month to show
+            var y_show = show.getFullYear();
+            var m_show = show.getMonth();
+            // today
+            var today = new Date();
+            var y_tod = today.getFullYear();
+            var m_tod = today.getMonth();
+            var d_tod = today.getDate();
+
+            // create table
+            var cal = $('<table><caption>'+month_names[m_show]+' '+y_show+'</caption></table>');
+
+            // add day-of-week headers
+            var row = $('<tr>').appendTo(cal);
+            for (var i = 0; i < 7; i++) {
+                row.append('<th>'+weekdays[(i + first_day_of_week) % 7]+'</th>');
+            }
+
+            var start = new Date(y_show, m_show, 1 - first_day_of_week).getDay();
+            var days = get_days_in_month(y_show, m_show);
+
+            // draw blanks before 1st of month
+            row = $('<tr>').appendTo(cal);
+            for (i = 0; i < start; i++) {
+                $('<td> </td>').appendTo(row).addClass('nonday');
+            }
+
+            // draw month days
+            var current = 1;
+            for (i = start; current <= days; i++) {
+                if (i % 7 === 0 && current != 1) {
+                    row = $('<tr>').appendTo(cal);
+                }
+                var today_class = '';
+                // mark today
+                if ((current == d_tod) && (m_show == m_tod) && (y_show == y_tod)) {
+                    today_class = 'today';
+                }
+                // mark selected day
+                if ((current == d_sel) && (m_show == m_sel) && (y_show == y_sel)) {
+                    today_class = 'selected';
+                }
+                $('<td>').appendTo(row)
+                    .addClass(today_class)
+                    .append('<a href="#">'+current+'</a>')
+                    .find('a')
+                    .data('date', new Date(y_show, m_show, current++));
+            }
+
+            // draw blanks after last of month
+            while(row.children('td').length < 7) {
+                $('<td> </td>').appendTo(row).addClass('nonday');
+            }
+
+            return cal;
+        };
+
+        // init one calendar per fieldset
+        var init_calendar_box = function(fieldset) {
+            // insert calendar box if not there
+            if (fieldset.find('.'+o.class_calendarbox).length === 0) {
+
+                $('<div class="'+o.class_calendarbox+' module">'  +
+                    '  <div>'+
+                    '    <a href="#" class="calendarnav-previous"><</a>' +
+                    '    <a href="#" class="calendarnav-next">></a>' +
+                    '  </div>' +
+                    '  <div class="calendar_table calendar"></div>' +
+                    '  <div class="calendar-shortcuts">'+
+                    '    <a href="#" class="'+o.class_today+' yesterday">'+gettext('Yesterday')+'</a> | <a href="#" class="'+o.class_today+'">'+gettext('Today')+'</a> | <a href="#" class="'+o.class_today+' tomorrow">'+gettext('Tomorrow')+'</a>' +
+                    '  </div>' +
+                    '  <p class="calendar-cancel"><a href="#">'+gettext('Cancel')+'</p>' +
+                    '</div>')
+                    .appendTo(fieldset).css('position', 'absolute').hide();
+
+                // prev/next event handlers
+                fieldset.find('.'+o.class_calendarbox)
+                    .delegate('.calendarnav-previous, .calendarnav-next',
+                              'click', function(event) {
+                        var func = $(this).is('.calendarnav-next') ? 'calendar_next' : 'calendar_previous';
+                        $(this).parents('.'+o.class_calendarbox).trigger(func);
+                        event.preventDefault();
+                        event.stopPropagation();
+                    })
+                    // days event handlers
+                    .delegate('td a', 'click', function(event) {
+                        fieldset.trigger('callback_calendar',
+                                         $(event.target).data('date'));
+                        event.preventDefault();
+                        event.stopPropagation();
+                    })
+                    // cancel link
+                    .find('.calendar-cancel').click(function(event) {
+                        fieldset.trigger('hide_calendar');
+                        event.preventDefault();
+                        event.stopPropagation();
+                    });
+            }
+        };
+
+        // init one clock box per fieldset
+        var init_clock_box = function(fieldset) {
+            // insert clock box if not there
+            if (fieldset.find('.'+o.class_clockbox).length === 0) {
+
+                var timelist = $('<div class="'+o.class_clockbox+' module">'  +
+                    '  <h2>'+gettext('Choose a time')+'</h2>' +
+                    '  <ul class="timelist"></ul>' +
+                    '  <p class="clock-cancel"><a href="#">'+gettext('Cancel')+'</p>' +
+                    '</div>')
+                    .appendTo(fieldset).css('position', 'absolute').hide()
+                    .find('.timelist');
+
+                timelist.append('<li><a href="#">'+gettext('Now')+'</a></li>').find('a:last').data('time', new Date());
+                timelist.append('<li><a href="#">'+gettext('Midnight')+'</a></li>').find('a:last').data('time', new Date(1970,1,1,0,0));
+                timelist.append('<li><a href="#">'+gettext('6 a.m.')+'</a></li>').find('a:last').data('time', new Date(1970,1,1,6,0));
+                timelist.append('<li><a href="#">'+gettext('Noon')+'</a></li>').find('a:last').data('time', new Date(1970,1,1,12,0));
+
+                // time links event handlers
+                fieldset.find('.'+o.class_clockbox)
+                    .delegate('li a', 'click', function(event) {
+                        fieldset.trigger('callback_clock',
+                                         $(event.target).data('time'));
+                        event.preventDefault();
+                        event.stopPropagation();
+                    })
+                    // cancel link
+                    .find('.clock-cancel').click(function(event) {
+                        fieldset.trigger('hide_clock');
+                        event.preventDefault();
+                        event.stopPropagation();
+                    });
+            }
+        };
+
+        return this.each(function() {
+            var fieldset = $(this);
+
+            /* --- setup datetimeshortcuts specific event handlers --------- */
+            fieldset
+
+            // show calendar
+            .bind('show_calendar', function(event) {
+                fieldset.trigger('hide_clock');
+                fieldset.trigger('hide_calendar');
+
+                var target = $(event.target);
+                var calendar = fieldset.children('.'+o.class_calendarbox);
+                var field = target
+                    .parents('.'+o.class_shortcuts)
+                    .prev(o.date_fields);
+
+                // Check current field value for valid date
+                // and open calendar with that date selected
+                var date_sel = null;
+                var date_show = new Date();
+                if (field.val().length > 0) {
+                    // only support specific date formats here for simplicity
+                    // (jQueryUI.datepicker.dateParse could help here)
+                    var regex = null, y, m, d;
+                    if (o.date_input_format == '%Y-%m-%d') {
+                        regex = /^(\d{4})-(\d{2})-(\d{2})$/;
+                        y=1; m=2; d=3;
+                    }
+                    else if (o.date_input_format == '%m/%d/%Y') {
+                        regex = /^(\d{2})\/(\d{2})\/(\d{4})$/;
+                        y=3; m=1; d=2;
+                    }
+                    else if (o.date_input_format == '%m/%d/%y') {
+                        regex = /^(\d{2})\/(\d{2})\/(\d{2})$/;
+                        y=3; m=1; d=2;
+                    }
+                    else if (o.date_input_format == '%d.%m.%Y') {
+                        regex = /^(\d{2})\.(\d{2})\.(\d{4})$/;
+                        y=3; m=2; d=1;
+                    }
+                    else if (o.date_input_format == '%d.%m.%y') {
+                        regex = /^(\d{2})\.(\d{2})\.(\d{2})$/;
+                        y=3; m=2; d=1;
+                    }
+
+                    if (regex !== null) {
+                        var match = regex.exec(field.val());
+                        if (match !== null) {
+                            year = match[y];
+                            month = match[m];
+                            day = match[d];
+                            if (y.length == 2) {
+                                year = '20'+year;
+                            }
+                            date_sel = new Date(year, month-1, day);
+                            date_show = new Date(year, month-1, day);
+                        }
+                    }
+                }
+
+                // open calendar
+                calendar
+                    // remember field and date
+                    .data('calendar_date_field', field)
+                    .data('calendar_date_show', date_show)
+                    .data('calendar_date_sel', date_sel)
+                    // draw correct month
+                    .find('.calendar_table').empty()
+                    .append(draw_calendar_table(date_sel, date_show))
+                    .end().show();
+
+                // position based on LTR or RTL direction
+                var target_pos = target.position();
+                var dir = $('body').attr('direction');
+                if (dir != 'rtl') {
+                    calendar.css('left', target_pos.left + target.width() + 'px');
+                }
+                if (dir == 'rtl' ||
+                    ((calendar.offset().left + calendar.width()) > $(window).width())) {
+                    calendar.css('left',
+                        target_pos.left - calendar.width() + 'px');
+                }
+                calendar.css('top',
+                    Math.max(0, target_pos.top - calendar.height()/2) + 'px');
+
+                // bind close handler to document
+                $('body').bind('click.datetimeshortcuts', function() {
+                    fieldset.trigger('hide_calendar');
+                });
+            })
+
+            // show next month in calendar
+            .bind('calendar_next', function(event) {
+                var cal = $(event.target);
+                var tbl = cal.find('.calendar_table').empty();
+                var selected = cal.data('calendar_date_sel');
+                var show = cal.data('calendar_date_show');
+                var month = show.getMonth();
+                var year = show.getFullYear();
+                if (month == 11) {
+                    month = 0;
+                    year++;
+                }
+                else {
+                    month++;
+                }
+                show.setFullYear(year, month, 1);
+                cal.data('calendar_date_show', show);
+                tbl.append(draw_calendar_table(selected, show));
+            })
+
+            // show previous month in calendar
+            .bind('calendar_previous', function(event) {
+                var cal = $(event.target);
+                var tbl = cal.find('.calendar_table').empty();
+                var selected = cal.data('calendar_date_sel');
+                var show = cal.data('calendar_date_show');
+                var month = show.getMonth();
+                var year = show.getFullYear();
+                if (month === 0) {
+                    month = 11;
+                    year--;
+                }
+                else {
+                    month--;
+                }
+                show.setFullYear(year, month, 1);
+                cal.data('calendar_date_show', show);
+                tbl.append(draw_calendar_table(selected, show));
+            })
+
+            // hide calendar
+            .bind('hide_calendar', function(event) {
+                $(event.target)
+                    .children('.'+o.class_calendarbox)
+                    .removeData('calendar_date_field')
+                    .removeData('calendar_date_sel')
+                    .removeData('calendar_date_show')
+                    .hide();
+                $('document').unbind('.datetimeshortcuts');
+            })
+
+            // show clock
+            .bind('show_clock', function(event) {
+                fieldset.trigger('hide_clock');
+                fieldset.trigger('hide_calendar');
+
+                var target = $(event.target);
+                var clock = fieldset.children('.'+o.class_clockbox);
+                var field = target
+                    .parents('.'+o.class_shortcuts)
+                    .prev(o.time_fields);
+
+                // open clock
+                clock
+                    .data('clock_time_field', field)
+                    .show();
+
+                // position based on LTR or RTL direction
+                var target_pos = target.position();
+                var dir = $('body').attr('direction');
+                if (dir != 'rtl') {
+                    clock.css('left', target_pos.left + target.width() + 'px');
+                }
+                if (dir == 'rtl' ||
+                    ((clock.offset().left + clock.width()) > $(window).width())) {
+                    clock.css('left', target_pos.left - clock.width() + 'px');
+                }
+                clock.css('top',
+                    Math.max(0, target_pos.top - clock.height()/2) + 'px');
+
+                // bind close handler to document
+                $('body').bind('click.datetimeshortcuts', function() {
+                    fieldset.trigger('hide_clock');
+                });
+            })
+
+            // hide clock
+            .bind('hide_clock', function(event) {
+                $(event.target)
+                    .children('.'+o.class_clockbox)
+                    .removeData('clock_time_field')
+                    .hide();
+                $('document').unbind('.datetimeshortcuts');
+            })
+
+            // calendar callback
+            .bind('callback_calendar', function(event, date) {
+                $(event.target)
+                    .find('.'+o.class_calendarbox)
+                    .data('calendar_date_field')
+                    .val(date.strftime(o.date_input_format))
+                    .focus();
+                fieldset.trigger('hide_calendar');
+            })
+
+            // today link callback
+            .bind('callback_today', function(event, days_offset) {
+                var d = new Date();
+                d.setDate(d.getDate() + days_offset);
+                $(event.target)
+                   .val(d.strftime(o.date_input_format))
+                   .focus();
+            })
+
+            // clock callback
+            .bind('callback_clock', function(event, time) {
+                $(event.target)
+                    .find('.'+o.class_clockbox)
+                    .data('clock_time_field')
+                    .val(time.strftime(o.time_input_format))
+                    .focus();
+                fieldset.trigger('hide_clock');
+            })
+
+            // now link callback
+            .bind('callback_now', function(event) {
+                var d = new Date();
+                $(event.target)
+                    .val(d.strftime(o.time_input_format))
+                    .focus();
+            });
+
+
+            /* --- add datetime shortcut widgets --------------------------- */
+
+            // add shortcuts to date fields
+            fieldset.find(o.date_fields).each(function() {
+                add_calendar($(this));
+            });
+            // add shortcuts to time fields
+            fieldset.find(o.time_fields).each(function() {
+                add_clock($(this));
+            });
+            // create calendar and clock widgets
+            init_calendar_box(fieldset);
+            init_clock_box(fieldset);
+
+
+            /* --- setup $(this)-wide event delegation --------------------- */
+            fieldset
+
+            // click on calendar
+            .delegate("."+o.class_shortcuts+" ."+o.class_calendar,
+                      "click", function(event) {
+                $(event.target).trigger('show_calendar');
+                // prevent following link
+                event.preventDefault();
+                event.stopPropagation();
+            })
+
+            // click on today link
+            .delegate("."+o.class_shortcuts+" ."+o.class_today,
+                      "click", function(event) {
+                $(event.target)
+                    // find .datetimeshortcuts span
+                    .parents('.'+o.class_shortcuts)
+                    .prev(o.date_fields)
+                    // update field
+                    .trigger('callback_today', 0);
+                fieldset.trigger('hide_calendar');
+                // prevent following link
+                event.preventDefault();
+                event.stopPropagation();
+            })
+
+            // click on yesterday/today/tomorrow links in calendar
+            .delegate("."+o.class_calendarbox+" ."+o.class_today,
+                      "click", function(event) {
+                var target = $(event.target);
+                var offset = 0;
+                if (target.is('.yesterday')) {
+                    offset = -1;
+                }
+                else if (target.is('.tomorrow')) {
+                    offset = 1;
+                }
+                // find calendarbox
+                target.parents('.'+o.class_calendarbox)
+                    // target field is stored on calendar's data attribute
+                    .data('calendar_date_field')
+                    // update field
+                    .trigger('callback_today', offset)
+                    .focus();
+                fieldset.trigger('hide_calendar');
+                // prevent following link
+                event.preventDefault();
+                event.stopPropagation();
+            })
+
+            // click on clock
+            .delegate("."+o.class_shortcuts+" ."+o.class_clock,
+                      "click", function(event) {
+                $(event.target).trigger('show_clock');
+                // prevent following link
+                event.preventDefault();
+                event.stopPropagation();
+            })
+
+            // click on now link
+            .delegate("."+o.class_shortcuts+" ."+o.class_now,
+                      "click", function(event) {
+                $(event.target)
+                    // find .datetimeshortcuts span
+                    .parents('.'+o.class_shortcuts)
+                    .prev(o.time_fields)
+                    // update field
+                    .trigger('callback_now');
+                fieldset.trigger('hide_clock');
+                // prevent following link
+                event.preventDefault();
+                event.stopPropagation();
+            });
+        });
+    };
+
+    $.fn.datetimeshortcuts.defaults = {
+        // classes (do not change - css depends on these)
+        class_shortcuts: "datetimeshortcuts",
+        class_today: "today",
+        class_calendar: "calendar",
+        class_now: "now",
+        class_clock: "clock",
+        class_calendarbox: "calendarbox",
+        class_clockbox: "clockbox",
+        // date and time format
+        date_input_format: get_format('DATE_INPUT_FORMATS')[0],
+        time_input_format: get_format('TIME_INPUT_FORMATS')[0],
+        // selectors for date and time fields
+        date_fields: "input:text.vDateField",
+        time_fields: "input:text.vTimeField",
+        // enable clock or calendar widgets
+        enable_calendar: true,
+        enable_today: true,
+        enable_clock: true,
+        enable_now: true
+    };
+
+    // by default, initialize on all fieldset.module elements
+    // which hold any date or time fields
+    $(document).ready(function() {
+       $("fieldset.module").datetimeshortcuts();
+    });
+
+})(django.jQuery);
diff --git a/django/contrib/admin/static/admin/js/datetimeshortcuts.min.js b/django/contrib/admin/static/admin/js/datetimeshortcuts.min.js
new file mode 100644
index 0000000..d8927d8
--- /dev/null
+++ b/django/contrib/admin/static/admin/js/datetimeshortcuts.min.js
@@ -0,0 +1,18 @@
+(function(c){c.fn.datetimeshortcuts=function(t){var u=c("body").data("datetimeshortcuts_defaults"),b=c.extend({admin_media_prefix:c("body").data("admin_media_prefix")},c.fn.datetimeshortcuts.defaults,u,t);if(b.admin_media_prefix===void 0)b.admin_media_prefix="/missing-admin-media-prefix/";var v=gettext("January February March April May June July August September October November December").split(" "),w=gettext("S M T W T F S").split(" "),s=parseInt(get_format("FIRST_DAY_OF_WEEK"),10),q=function(b,
+a){var e,h,g;b!==null&&(e=b.getFullYear(),h=b.getMonth(),g=b.getDate());for(var i=a.getFullYear(),f=a.getMonth(),j=new Date,k=j.getFullYear(),m=j.getMonth(),j=j.getDate(),r=c("<table><caption>"+v[f]+" "+i+"</caption></table>"),n=c("<tr>").appendTo(r),l=0;l<7;l++)n.append("<th>"+w[(l+s)%7]+"</th>");for(var o=(new Date(i,f,1-s)).getDay(),q=32-(new Date(i,f,32)).getDate(),n=c("<tr>").appendTo(r),l=0;l<o;l++)c("<td> </td>").appendTo(n).addClass("nonday");for(var p=1,l=o;p<=q;l++)l%7===0&&p!=1&&(n=c("<tr>").appendTo(r)),
+o="",p==j&&f==m&&i==k&&(o="today"),p==g&&f==h&&i==e&&(o="selected"),c("<td>").appendTo(n).addClass(o).append('<a href="#">'+p+"</a>").find("a").data("date",new Date(i,f,p++));for(;n.children("td").length<7;)c("<td> </td>").appendTo(n).addClass("nonday");return r},x=function(d){d.find("."+b.class_calendarbox).length===0&&(c('<div class="'+b.class_calendarbox+' module">  <div>    <a href="#" class="calendarnav-previous"><</a>    <a href="#" class="calendarnav-next">></a>  </div>  <div class="calendar_table calendar"></div>  <div class="calendar-shortcuts">    <a href="#" class="'+
+b.class_today+' yesterday">'+gettext("Yesterday")+'</a> |\u00a0<a href="#" class="'+b.class_today+'">'+gettext("Today")+'</a> |\u00a0<a href="#" class="'+b.class_today+' tomorrow">'+gettext("Tomorrow")+'</a>  </div>  <p class="calendar-cancel"><a href="#">'+gettext("Cancel")+"</p></div>").appendTo(d).css("position","absolute").hide(),d.find("."+b.class_calendarbox).delegate(".calendarnav-previous, .calendarnav-next","click",function(a){var e=c(this).is(".calendarnav-next")?"calendar_next":"calendar_previous";
+c(this).parents("."+b.class_calendarbox).trigger(e);a.preventDefault();a.stopPropagation()}).delegate("td a","click",function(a){d.trigger("callback_calendar",c(a.target).data("date"));a.preventDefault();a.stopPropagation()}).find(".calendar-cancel").click(function(a){d.trigger("hide_calendar");a.preventDefault();a.stopPropagation()}))},y=function(d){if(d.find("."+b.class_clockbox).length===0){var a=c('<div class="'+b.class_clockbox+' module">  <h2>'+gettext("Choose a time")+'</h2>  <ul class="timelist"></ul>  <p class="clock-cancel"><a href="#">'+
+gettext("Cancel")+"</p></div>").appendTo(d).css("position","absolute").hide().find(".timelist");a.append('<li><a href="#">'+gettext("Now")+"</a></li>").find("a:last").data("time",new Date);a.append('<li><a href="#">'+gettext("Midnight")+"</a></li>").find("a:last").data("time",new Date(1970,1,1,0,0));a.append('<li><a href="#">'+gettext("6 a.m.")+"</a></li>").find("a:last").data("time",new Date(1970,1,1,6,0));a.append('<li><a href="#">'+gettext("Noon")+"</a></li>").find("a:last").data("time",new Date(1970,
+1,1,12,0));d.find("."+b.class_clockbox).delegate("li a","click",function(a){d.trigger("callback_clock",c(a.target).data("time"));a.preventDefault();a.stopPropagation()}).find(".clock-cancel").click(function(a){d.trigger("hide_clock");a.preventDefault();a.stopPropagation()})}};return this.each(function(){var d=c(this);d.bind("show_calendar",function(a){d.trigger("hide_clock");d.trigger("hide_calendar");var a=c(a.target),e=d.children("."+b.class_calendarbox),h=a.parents("."+b.class_shortcuts).prev(b.date_fields),
+g=null,i=new Date;if(h.val().length>0){var f=null,j,k,m;b.date_input_format=="%Y-%m-%d"?(f=/^(\d{4})-(\d{2})-(\d{2})$/,j=1,k=2,m=3):b.date_input_format=="%m/%d/%Y"?(f=/^(\d{2})\/(\d{2})\/(\d{4})$/,j=3,k=1,m=2):b.date_input_format=="%m/%d/%y"?(f=/^(\d{2})\/(\d{2})\/(\d{2})$/,j=3,k=1,m=2):b.date_input_format=="%d.%m.%Y"?(f=/^(\d{2})\.(\d{2})\.(\d{4})$/,j=3,k=2,m=1):b.date_input_format=="%d.%m.%y"&&(f=/^(\d{2})\.(\d{2})\.(\d{2})$/,j=3,k=2,m=1);f!==null&&(f=f.exec(h.val()),f!==null&&(year=f[j],month=
+f[k],day=f[m],j.length==2&&(year="20"+year),g=new Date(year,month-1,day),i=new Date(year,month-1,day)))}e.data("calendar_date_field",h).data("calendar_date_show",i).data("calendar_date_sel",g).find(".calendar_table").empty().append(q(g,i)).end().show();j=a.position();k=c("body").attr("direction");k!="rtl"&&e.css("left",j.left+a.width()+"px");(k=="rtl"||e.offset().left+e.width()>c(window).width())&&e.css("left",j.left-e.width()+"px");e.css("top",Math.max(0,j.top-e.height()/2)+"px");c("body").bind("click.datetimeshortcuts",
+function(){d.trigger("hide_calendar")})}).bind("calendar_next",function(a){var a=c(a.target),b=a.find(".calendar_table").empty(),d=a.data("calendar_date_sel"),g=a.data("calendar_date_show"),i=g.getMonth(),f=g.getFullYear();i==11?(i=0,f++):i++;g.setFullYear(f,i,1);a.data("calendar_date_show",g);b.append(q(d,g))}).bind("calendar_previous",function(a){var a=c(a.target),b=a.find(".calendar_table").empty(),d=a.data("calendar_date_sel"),g=a.data("calendar_date_show"),i=g.getMonth(),f=g.getFullYear();i===
+0?(i=11,f--):i--;g.setFullYear(f,i,1);a.data("calendar_date_show",g);b.append(q(d,g))}).bind("hide_calendar",function(a){c(a.target).children("."+b.class_calendarbox).removeData("calendar_date_field").removeData("calendar_date_sel").removeData("calendar_date_show").hide();c("document").unbind(".datetimeshortcuts")}).bind("show_clock",function(a){d.trigger("hide_clock");d.trigger("hide_calendar");var a=c(a.target),e=d.children("."+b.class_clockbox),h=a.parents("."+b.class_shortcuts).prev(b.time_fields);
+e.data("clock_time_field",h).show();var h=a.position(),g=c("body").attr("direction");g!="rtl"&&e.css("left",h.left+a.width()+"px");(g=="rtl"||e.offset().left+e.width()>c(window).width())&&e.css("left",h.left-e.width()+"px");e.css("top",Math.max(0,h.top-e.height()/2)+"px");c("body").bind("click.datetimeshortcuts",function(){d.trigger("hide_clock")})}).bind("hide_clock",function(a){c(a.target).children("."+b.class_clockbox).removeData("clock_time_field").hide();c("document").unbind(".datetimeshortcuts")}).bind("callback_calendar",
+function(a,e){c(a.target).find("."+b.class_calendarbox).data("calendar_date_field").val(e.strftime(b.date_input_format)).focus();d.trigger("hide_calendar")}).bind("callback_today",function(a,d){var h=new Date;h.setDate(h.getDate()+d);c(a.target).val(h.strftime(b.date_input_format)).focus()}).bind("callback_clock",function(a,e){c(a.target).find("."+b.class_clockbox).data("clock_time_field").val(e.strftime(b.time_input_format)).focus();d.trigger("hide_clock")}).bind("callback_now",function(a){var d=
+new Date;c(a.target).val(d.strftime(b.time_input_format)).focus()});d.find(b.date_fields).each(function(){var a=c(this),a=c('<span class="'+b.class_shortcuts+'">').insertAfter(a);b.enable_today&&(a.append(' <a href="#" class="'+b.class_today+'">'+gettext("Today")+"</a>"),b.enable_calendar&&a.append(" | "));b.enable_calendar&&c('<a href="#" class="'+b.class_calendar+'"></a>').appendTo(a).append('<img src="'+b.admin_media_prefix+'img/icon_calendar.gif" alt="'+gettext("Calendar")+'" />')});d.find(b.time_fields).each(function(){var a=
+c(this),a=c('<span class="'+b.class_shortcuts+'">').insertAfter(a);b.enable_now&&(a.append(' <a href="#" class="'+b.class_now+'">'+gettext("Now")+"</a>"),b.enable_clock&&a.append(" | "));b.enable_clock&&c('<a href="#" class="'+b.class_clock+'"></a>').appendTo(a).append('<img src="'+b.admin_media_prefix+'img/icon_clock.gif" alt="'+gettext("Clock")+'" />')});x(d);y(d);d.delegate("."+b.class_shortcuts+" ."+b.class_calendar,"click",function(a){c(a.target).trigger("show_calendar");a.preventDefault();a.stopPropagation()}).delegate("."+
+b.class_shortcuts+" ."+b.class_today,"click",function(a){c(a.target).parents("."+b.class_shortcuts).prev(b.date_fields).trigger("callback_today",0);d.trigger("hide_calendar");a.preventDefault();a.stopPropagation()}).delegate("."+b.class_calendarbox+" ."+b.class_today,"click",function(a){var e=c(a.target),h=0;e.is(".yesterday")?h=-1:e.is(".tomorrow")&&(h=1);e.parents("."+b.class_calendarbox).data("calendar_date_field").trigger("callback_today",h).focus();d.trigger("hide_calendar");a.preventDefault();
+a.stopPropagation()}).delegate("."+b.class_shortcuts+" ."+b.class_clock,"click",function(a){c(a.target).trigger("show_clock");a.preventDefault();a.stopPropagation()}).delegate("."+b.class_shortcuts+" ."+b.class_now,"click",function(a){c(a.target).parents("."+b.class_shortcuts).prev(b.time_fields).trigger("callback_now");d.trigger("hide_clock");a.preventDefault();a.stopPropagation()})})};c.fn.datetimeshortcuts.defaults={class_shortcuts:"datetimeshortcuts",class_today:"today",class_calendar:"calendar",
+class_now:"now",class_clock:"clock",class_calendarbox:"calendarbox",class_clockbox:"clockbox",date_input_format:get_format("DATE_INPUT_FORMATS")[0],time_input_format:get_format("TIME_INPUT_FORMATS")[0],date_fields:"input:text.vDateField",time_fields:"input:text.vTimeField",enable_calendar:!0,enable_today:!0,enable_clock:!0,enable_now:!0};c(document).ready(function(){c("fieldset.module").datetimeshortcuts()})})(django.jQuery);
diff --git a/django/contrib/admin/templates/admin/base.html b/django/contrib/admin/templates/admin/base.html
index caa2674..4443f62 100644
--- a/django/contrib/admin/templates/admin/base.html
+++ b/django/contrib/admin/templates/admin/base.html
@@ -14,6 +14,21 @@
 
 <body class="{% if is_popup %}popup {% endif %}{% block bodyclass %}{% endblock %}">
 
+<script type="text/javascript">
+    if (typeof(django) != "undefined" && typeof(django.jQuery) != "undefined") {
+        (function($) {
+            $('body').data('admin_media_prefix', "{% filter escapejs %}{% static "admin/" %}{% endfilter %}");
+            {# TODO: templatetag admin_datetimeshortcuts (?) to render the following from django.conf.settings #}
+            $('body').data('datetimeshortcuts_defaults', {
+                enable_calendar: true,
+                enable_today: true,
+                enable_clock: true,
+                enable_now: true
+            });
+        })(django.jQuery);
+    }
+</script>
+
 <!-- Container -->
 <div id="container">
 
diff --git a/django/contrib/admin/templates/admin/edit_inline/stacked.html b/django/contrib/admin/templates/admin/edit_inline/stacked.html
index 08e8ca3..0456d6c 100644
--- a/django/contrib/admin/templates/admin/edit_inline/stacked.html
+++ b/django/contrib/admin/templates/admin/edit_inline/stacked.html
@@ -28,13 +28,6 @@
                 $(this).html($(this).html().replace(/(#\d+)/g, "#" + count));
             });
         };
-        var reinitDateTimeShortCuts = function() {
-            // Reinitialize the calendar and clock widgets by force, yuck.
-            if (typeof DateTimeShortcuts != "undefined") {
-                $(".datetimeshortcuts").remove();
-                DateTimeShortcuts.init();
-            }
-        };
         var updateSelectFilter = function() {
             // If any SelectFilter widgets were added, instantiate a new instance.
             if (typeof SelectFilter != "undefined"){
@@ -72,7 +65,6 @@
             removed: updateInlineLabel,
             added: (function(row) {
                 initPrepopulatedFields(row);
-                reinitDateTimeShortCuts();
                 updateSelectFilter();
                 updateInlineLabel(row);
             })
diff --git a/django/contrib/admin/templates/admin/edit_inline/tabular.html b/django/contrib/admin/templates/admin/edit_inline/tabular.html
index 9e215af..157632e 100644
--- a/django/contrib/admin/templates/admin/edit_inline/tabular.html
+++ b/django/contrib/admin/templates/admin/edit_inline/tabular.html
@@ -75,13 +75,6 @@
                 .filter(":even").addClass("row1").end()
                 .filter(rows + ":odd").addClass("row2");
         }
-        var reinitDateTimeShortCuts = function() {
-            // Reinitialize the calendar and clock widgets by force
-            if (typeof DateTimeShortcuts != "undefined") {
-                $(".datetimeshortcuts").remove();
-                DateTimeShortcuts.init();
-            }
-        }
         var updateSelectFilter = function() {
             // If any SelectFilter widgets are a part of the new form,
             // instantiate a new SelectFilter instance for it.
@@ -120,7 +113,6 @@
             removed: alternatingRows,
             added: (function(row) {
                 initPrepopulatedFields(row);
-                reinitDateTimeShortCuts();
                 updateSelectFilter();
                 alternatingRows(row);
             })
diff --git a/django/contrib/admin/widgets.py b/django/contrib/admin/widgets.py
index 29958b2..0d3f740 100644
--- a/django/contrib/admin/widgets.py
+++ b/django/contrib/admin/widgets.py
@@ -50,7 +50,7 @@ class AdminDateWidget(forms.DateInput):
 
     @property
     def media(self):
-        js = ["calendar.js", "admin/DateTimeShortcuts.js"]
+        js = ["datetimeshortcuts.min.js"]
         return forms.Media(js=[static("admin/js/%s" % path) for path in js])
 
     def __init__(self, attrs=None, format=None):
@@ -63,7 +63,7 @@ class AdminTimeWidget(forms.TimeInput):
 
     @property
     def media(self):
-        js = ["calendar.js", "admin/DateTimeShortcuts.js"]
+        js = ["datetimeshortcuts.min.js"]
         return forms.Media(js=[static("admin/js/%s" % path) for path in js])
 
     def __init__(self, attrs=None, format=None):
