Opened 18 years ago
Closed 14 years ago
#4978 closed Bug (fixed)
Admin DateTimeShortcuts.js ISODate
| Reported by: | Owned by: | xian | |
|---|---|---|---|
| Component: | contrib.admin | Version: | dev |
| Severity: | Normal | Keywords: | datetime calendar isodate date |
| Cc: | Triage Stage: | Accepted | |
| Has patch: | yes | Needs documentation: | no |
| Needs tests: | no | Patch needs improvement: | no |
| Easy pickings: | no | UI/UX: | no |
Description
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();
Change History (4)
comment:1 by , 18 years ago
| Owner: | changed from to |
|---|
comment:2 by , 18 years ago
| Triage Stage: | Unreviewed → Accepted |
|---|
comment:3 by , 15 years ago
| Severity: | → Normal |
|---|---|
| Type: | → Bug |
comment:4 by , 14 years ago
| Easy pickings: | unset |
|---|---|
| Resolution: | → fixed |
| Status: | new → closed |
| UI/UX: | unset |
It seems this is fixed for some time now. Please reopen if you can reproduce it in up-to-date code.
Note:
See TracTickets
for help on using tickets.
Reassigning to xian.