Opened 5 years ago
Last modified 5 years ago
#30725 closed Bug
Textbox size of a DateTimeField with local timezone in settings becomes too small in admin.TabularInline when browser windows is made smaller — at Version 16
Reported by: | Basil Eric Rabi | Owned by: | Utkarsh Rajwansh |
---|---|---|---|
Component: | contrib.admin | Version: | dev |
Severity: | Normal | Keywords: | |
Cc: | Lionel Bersee, Utkarsh Rajwansh, Min ho Kim | Triage Stage: | Ready for checkin |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | yes | UI/UX: | yes |
Description (last modified by )
I have a model with a DateTimeField and used it in admin.TabularInline for the Django Admin using TIME_ZONE = 'Asia/Manila'
in settings.py
. When the browser window is wide enough there are no issues. But when the browser window is made smaller or when you use a phone to view the admin page, you can't see the text inside the text box for the date and time since the boxes become too small.
Change History (20)
by , 5 years ago
comment:1 by , 5 years ago
Easy pickings: | set |
---|---|
Triage Stage: | Unreviewed → Accepted |
OK, yes. Looks like a CSS adjustment (min-width
?) is needed. Thanks for the report (and screenshot!)
comment:3 by , 5 years ago
Feel-free (I saw that you left the same question in few tickets) it's probably better to focus on 1-2 tickets and start to work on others when fix is ready.
comment:4 by , 5 years ago
I would like to pick up and work on this ticket, would this be okay? I am a first time contributor.
comment:5 by , 5 years ago
Cc: | added |
---|
comment:7 by , 5 years ago
Owner: | changed from | to
---|---|
Status: | new → assigned |
comment:8 by , 5 years ago
Owner: | removed |
---|---|
Status: | assigned → new |
Sorry I've become a little busy and might not have time to work on this, others are free to pick up.
comment:9 by , 5 years ago
Cc: | added |
---|---|
Owner: | set to |
Status: | new → assigned |
comment:10 by , 5 years ago
Resolution: | → needsinfo |
---|---|
Status: | assigned → closed |
Tried recreating the issue but didn't find any practical application or scenario where such a small screen resolution is needed as per my observation.So either there is not enough info to proceed on this bug or this bug is invalid.
Screenshots attached with screen resolution parameters.
comment:11 by , 5 years ago
Resolution: | needsinfo |
---|---|
Status: | closed → new |
You need to put the DateTimeField in the TabularInline along with other fields such as CharField and Text field. When there are a number of fields, the TabularInline becomes scrollable from left to right and the text box of the DateTimeField becomes very small.
comment:12 by , 5 years ago
Attaching another screenshot (firefox.png) to further clarify the issue. As can be observed, the text box of the DateTimeField in the TabularInline is too small that the contents can't be read. This issue is only present in the TabularInline and not in the StackedInline so I believe this is a valid bug.
comment:13 by , 5 years ago
I guess , need more time to understand repo. By the time if anyone else has fix please go ahead.
comment:14 by , 5 years ago
Hi Basil Eric Rabi,
I tried to reproduce the issue as well, but couldn't make it.
I made my admin look like your screenshot with DateTimeField in TabularInline along with CharField and TextField.
But none of the fields, including DateTimeField, shrunk at any screen size I can test.
It just becomes scrollable all the way through, and DateTimeField input box size changes very slightly as you resize the screen.
I tried Django version 2.2 and master.
Tried on current versions of Chrome and FireFox, checking different screen sizes for various devices, and tried on my mobile phone.
I think we need more information here.
comment:15 by , 5 years ago
Cc: | added |
---|
comment:16 by , 5 years ago
Description: | modified (diff) |
---|---|
Summary: | Textbox size of a DateTimeField becomes too small in admin.TabularInline when browser windows is made smaller → Textbox size of a DateTimeField with local timezone in settings becomes too small in admin.TabularInline when browser windows is made smaller |
Hi Min ho Kim,
I'm sorry for the lacking information. I just tried to do a minimal reproducible example and found out what was missing was the TIME_ZONE = 'Asia/Manila'
in settings.py
. It seems the bug is not triggered if TIME_ZONE = 'UTC'
. I updated the bug description.
Screen shot