#4978: Admin DateTimeShortcuts.js ISODate
----------------------------------------+-----------------------------------
Reporter: fero <[EMAIL PROTECTED]> | Owner: adrian
Status: new | Component: Admin interface
Version: SVN | Keywords: datetime calendar
isodate date
Stage: Unreviewed | Has_patch: 1
----------------------------------------+-----------------------------------
By clicking on a Day in the little calendar I have not an ISODate,
whereas I have an ISODate if I click the "today" link.
I solved the problem with this patch:
{{{
--- /usr/lib/python2.4/site-
packages/django/contrib/admin/media/js/admin/DateTimeShortcuts.js 2007-
06-04 17:58:14.000000000 +0200
+++ static/js/admin/DateTimeShortcuts.js 2007-07-26
11:33:02.459656656 +0200
@@ -223,7 +213,7 @@
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) { var D = new Date(y,m-1,d);
DateTimeShortcuts.calendarInputs["+num+"].value = D.getISODate();
document.getElementById(DateTimeShortcuts.calendarDivName1+"+num+").style.display='none';}";
},
handleCalendarQuickLink: function(num, offset) {
var d = new Date();
}}}
--
Ticket URL: <http://code.djangoproject.com/ticket/4978>
Django Code <http://code.djangoproject.com/>
The web framework for perfectionists with deadlines
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/django-updates?hl=en
-~----------~----~----~----~------~----~------~--~---