[Django] #37074: "Today" in admin datetime widget differs from "today" in calendar picker display

21 views
Skip to first unread message

Django

unread,
Apr 28, 2026, 9:02:27 AMApr 28
to django-...@googlegroups.com
#37074: "Today" in admin datetime widget differs from "today" in calendar picker
display
-----------------------------+-----------------------------------------
Reporter: Jacob Walls | Type: Bug
Status: new | Component: contrib.admin
Version: dev | Severity: Normal
Keywords: | Triage Stage: Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 1
-----------------------------+-----------------------------------------
The calendar widget for date fields in the admin has a discrepancy in how
"today" is calculated.

The widget input treats "today" as in server time.

But the highlighting in bold of "today's" entry on the calendar squares
(`class = "today"`) is calculated in local time. (After #36459 this will
also affect an aria-label on that square.)

This means that for a TIME_ZONE of UTC+12 (`TIME_ZONE = "Pacific/Nauru"`)
and a local time of something else (for me, `America/NewYork`), the
"Today" button produces the date in Nauru, but the previous date is
highlighted with `class="today"`.

The proposal for #35951 passes the server timezone to the frontend. Once
that is in place, we can use it to remove this discrepancy by making
"today" always calculated the same.
--
Ticket URL: <https://code.djangoproject.com/ticket/37074>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
Apr 28, 2026, 12:52:00 PMApr 28
to django-...@googlegroups.com
#37074: "Today" in admin datetime widget differs from "today" in calendar picker
display
-------------------------------+--------------------------------------
Reporter: Jacob Walls | Owner: (none)
Type: Bug | Status: new
Component: contrib.admin | Version: dev
Severity: Normal | Resolution:
Keywords: | Triage Stage: Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 1
-------------------------------+--------------------------------------
Comment (by Jacob Walls):

Ah, we probably don't need to wait for #35951, as we already have a body
data attribute with a server offset.
--
Ticket URL: <https://code.djangoproject.com/ticket/37074#comment:1>

Django

unread,
Apr 30, 2026, 9:10:53 AMApr 30
to django-...@googlegroups.com
#37074: "Today" in admin datetime widget differs from "today" in calendar picker
display
-------------------------------+------------------------------------
Reporter: Jacob Walls | Owner: (none)
Type: Bug | Status: new
Component: contrib.admin | Version: dev
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 1
-------------------------------+------------------------------------
Changes (by Tim Graham):

* stage: Unreviewed => Accepted

--
Ticket URL: <https://code.djangoproject.com/ticket/37074#comment:2>

Django

unread,
May 1, 2026, 9:34:50 AMMay 1
to django-...@googlegroups.com
#37074: "Today" in admin datetime widget differs from "today" in calendar picker
display
-------------------------------+---------------------------------------
Reporter: Jacob Walls | Owner: SnippyCodes
Type: Bug | Status: assigned
Component: contrib.admin | Version: dev
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 1
-------------------------------+---------------------------------------
Changes (by SnippyCodes):

* has_patch: 0 => 1
* owner: (none) => SnippyCodes
* status: new => assigned

--
Ticket URL: <https://code.djangoproject.com/ticket/37074#comment:3>

Django

unread,
May 1, 2026, 5:27:16 PMMay 1
to django-...@googlegroups.com
#37074: "Today" in admin datetime widget differs from "today" in calendar picker
display
-------------------------------+---------------------------------------
Reporter: Jacob Walls | Owner: SnippyCodes
Type: Bug | Status: assigned
Component: contrib.admin | Version: dev
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 1 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 1
-------------------------------+---------------------------------------
Changes (by Jacob Walls):

* needs_tests: 0 => 1

--
Ticket URL: <https://code.djangoproject.com/ticket/37074#comment:4>

Django

unread,
May 6, 2026, 1:21:06 PMMay 6
to django-...@googlegroups.com
#37074: "Today" in admin datetime widget differs from "today" in calendar picker
display
-------------------------------+---------------------------------------
Reporter: Jacob Walls | Owner: SnippyCodes
Type: Bug | Status: assigned
Component: contrib.admin | Version: dev
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 1 | Patch needs improvement: 1
Easy pickings: 0 | UI/UX: 1
-------------------------------+---------------------------------------
Changes (by Jacob Walls):

* needs_better_patch: 0 => 1

--
Ticket URL: <https://code.djangoproject.com/ticket/37074#comment:5>

Django

unread,
May 8, 2026, 11:50:46 AMMay 8
to django-...@googlegroups.com
#37074: "Today" in admin datetime widget differs from "today" in calendar picker
display
-------------------------------------+-------------------------------------
Reporter: Jacob Walls | Owner:
| SnippyCodes
Type: Bug | Status: assigned
Component: contrib.admin | Version: dev
Severity: Normal | Resolution:
Keywords: | Triage Stage: Ready for
| checkin
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 1
-------------------------------------+-------------------------------------
Changes (by Jacob Walls):

* needs_better_patch: 1 => 0
* needs_tests: 1 => 0
* stage: Accepted => Ready for checkin

--
Ticket URL: <https://code.djangoproject.com/ticket/37074#comment:6>

Django

unread,
May 8, 2026, 1:04:38 PMMay 8
to django-...@googlegroups.com
#37074: "Today" in admin datetime widget differs from "today" in calendar picker
display
-------------------------------------+-------------------------------------
Reporter: Jacob Walls | Owner:
| SnippyCodes
Type: Bug | Status: closed
Component: contrib.admin | Version: dev
Severity: Normal | Resolution: fixed
Keywords: | Triage Stage: Ready for
| checkin
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 1
-------------------------------------+-------------------------------------
Changes (by Jacob Walls <jacobtylerwalls@…>):

* resolution: => fixed
* status: assigned => closed

Comment:

In [changeset:"9d4ee17b268d9621112a77f22d650e126537de16" 9d4ee17]:
{{{#!CommitTicketReference repository=""
revision="9d4ee17b268d9621112a77f22d650e126537de16"
Fixed #37074 -- Synced admin calendar today highlight with server time.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/37074#comment:7>
Reply all
Reply to author
Forward
0 new messages