#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.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion visit 
https://groups.google.com/d/msgid/django-updates/0107019dd42ef5a8-7d0052e1-cf40-43f5-933f-01dc046593be-000000%40eu-central-1.amazonses.com.

Reply via email to