--
Ticket URL: <https://code.djangoproject.com/ticket/30725>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
* Attachment "small.png" added.
Screen shot
* easy: 0 => 1
* stage: Unreviewed => Accepted
Comment:
OK, yes. Looks like a CSS adjustment (`min-width`?) is needed. Thanks for
the report (and screenshot!)
--
Ticket URL: <https://code.djangoproject.com/ticket/30725#comment:1>
Comment (by tapaswenipathak):
Hello folks: Can I take the ticket?
--
Ticket URL: <https://code.djangoproject.com/ticket/30725#comment:2>
Comment (by felixxm):
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.
--
Ticket URL: <https://code.djangoproject.com/ticket/30725#comment:3>
Comment (by Lionel Bersee):
I would like to pick up and work on this ticket, would this be okay? I am
a first time contributor.
--
Ticket URL: <https://code.djangoproject.com/ticket/30725#comment:4>
* cc: Lionel Bersee (added)
--
Ticket URL: <https://code.djangoproject.com/ticket/30725#comment:5>
Comment (by felixxm):
Lionel, feel-free, patch is welcome.
--
Ticket URL: <https://code.djangoproject.com/ticket/30725#comment:6>
* owner: nobody => Lionel Bersee
* status: new => assigned
--
Ticket URL: <https://code.djangoproject.com/ticket/30725#comment:7>
* owner: Lionel Bersee => (none)
* status: assigned => new
Comment:
Sorry I've become a little busy and might not have time to work on this,
others are free to pick up.
--
Ticket URL: <https://code.djangoproject.com/ticket/30725#comment:8>
* status: new => assigned
* owner: (none) => urajwansh
* cc: urajwansh (added)
--
Ticket URL: <https://code.djangoproject.com/ticket/30725#comment:9>
* Attachment "screenshot1.png" added.
screen resolution for small device
* Attachment "screenshot2.png" added.
attempt to create the issue
* status: assigned => closed
* resolution: => needsinfo
Comment:
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.
screenshot1.png
[[Image(https://code.djangoproject.com/attachment/ticket/30725/screenshot1.png)]]
screenshot2.png
[[Image(https://code.djangoproject.com/attachment/ticket/30725/screenshot2.png)]]
--
Ticket URL: <https://code.djangoproject.com/ticket/30725#comment:10>
* status: closed => new
* resolution: needsinfo =>
Comment:
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.
--
Ticket URL: <https://code.djangoproject.com/ticket/30725#comment:11>
* Attachment "firefox.png" added.
More screentshot of the issue
Comment (by Basil Eric Rabi):
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.
--
Ticket URL: <https://code.djangoproject.com/ticket/30725#comment:12>
Comment (by Utkarsh Rajwansh):
I guess , need more time to understand repo. By the time if anyone else
has fix please go ahead.
--
Ticket URL: <https://code.djangoproject.com/ticket/30725#comment:13>
Comment (by Min ho Kim):
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.
--
Ticket URL: <https://code.djangoproject.com/ticket/30725#comment:14>
* cc: Min ho Kim (added)
--
Ticket URL: <https://code.djangoproject.com/ticket/30725#comment:15>
Old description:
> I have a model with a DateTimeField and used it in admin.TabularInline
> for the Django Admin. 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.
New description:
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.
--
Comment (by Basil Eric Rabi):
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.
--
Ticket URL: <https://code.djangoproject.com/ticket/30725#comment:16>
Comment (by Min ho Kim):
Hi Basil Eric Rabi,
I don't think it's related to the settings either, changing TIME_ZONE =
'Asia/Manila' doesn't do anything.
It looks like a CSS issue like Carlton said (not your CSS file).
{{{
django>contrib>admin>static>admin>css>widgets.css>
min-width: 0;
}}}
What browser are you using? and what version is it?
If it's not the latest version, could you upgrade the browser and see if
it still exist?
--
Ticket URL: <https://code.djangoproject.com/ticket/30725#comment:17>
Comment (by Basil Eric Rabi):
Hi Min ho Kim,
I meant that by changing the `TIME_ZONE` to
`your_browser's_local_timezone`, the issue will be reproduced. For me, my
time zone is `Asia/Manila`. If I put time zones other than my local time
zone (which is `Asia/Manila`), the text box *does not* shrink when the
browser window is resized smaller. This must be the case for you since
most probably, your time zone is not `Asia/Manila`. I think you can
reproduce the issue if you change the time zone to your local one.
This may be related to the absence of this message under the widget:
```
Note: You are n hours ahead/behind server time.
```
If this message is absent, then the text box will shrink if the browser
window is resized.
These are the browsers I am presently testing:
1. Firefox 69.0 (Fedora 30)
1. Firefox 68.1 (Android O)
1. Google Chrome 76.0.3809.132 (Fedora 30)
--
Ticket URL: <https://code.djangoproject.com/ticket/30725#comment:18>
Comment (by Min ho Kim):
Hi Basil Eric Rabi,
Yes! Changing TIME_ZONE does reproduce the issue!
In my case, "Australia/Sydney".
--
Ticket URL: <https://code.djangoproject.com/ticket/30725#comment:19>
* version: 2.2 => master
--
Ticket URL: <https://code.djangoproject.com/ticket/30725#comment:20>
* has_patch: 0 => 1
--
Ticket URL: <https://code.djangoproject.com/ticket/30725#comment:21>
Comment (by Min ho Kim):
{{{
I guess , need more time to understand repo. By the time if anyone else
has fix please go ahead.
}}}
Hi Utkarsh Rajwansh,
I submitted patch. Hope you don't mind.
--
Ticket URL: <https://code.djangoproject.com/ticket/30725#comment:22>
* owner: Utkarsh Rajwansh => Min ho Kim
* status: new => assigned
* stage: Accepted => Ready for checkin
--
Ticket URL: <https://code.djangoproject.com/ticket/30725#comment:23>
* status: assigned => closed
* resolution: => fixed
Comment:
In [changeset:"b1d6b35e146aea83b171c1b921178bbaae2795ed" b1d6b35e]:
{{{
#!CommitTicketReference repository=""
revision="b1d6b35e146aea83b171c1b921178bbaae2795ed"
Fixed #30725 -- Fixed width of DateTimeField inputs in admin tabular
inline.
"width" of DateTimeField inputs in admin tabular inline wasn't set
correctly what caused displaying too small inputs with responsive CSS
when timezone warning wasn't present.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/30725#comment:24>
Comment (by Mariusz Felisiak <felisiak.mariusz@…>):
In [changeset:"6c761a25fbd1931a363457b275e2f1f5395814fe" 6c761a2]:
{{{
#!CommitTicketReference repository=""
revision="6c761a25fbd1931a363457b275e2f1f5395814fe"
[3.0.x] Fixed #30725 -- Fixed width of DateTimeField inputs in admin
tabular inline.
"width" of DateTimeField inputs in admin tabular inline wasn't set
correctly what caused displaying too small inputs with responsive CSS
when timezone warning wasn't present.
Backport of b1d6b35e146aea83b171c1b921178bbaae2795ed from master
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/30725#comment:25>