Closed (works as designed)
Project:
Date
Version:
5.x-2.0-rc6
Component:
User interface
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
30 Jul 2008 at 20:37 UTC
Updated:
17 Sep 2015 at 12:20 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
Grantovich commentedAttachment, take two. I'm sure I hit the Attach button last time...
Comment #2
karens commentedThis is Safari then? I think this is a browser-specific problem. I increased the size of the boxes because the new Date Popup used in the D6 version allows for formats that include month and day names and I wanted to allow space for that. I expanded the box size in both D5 and D6 so the same css and formatting will work in both.
But the box is not supposed to be *that* big (and it isn't in my browsers) so we need some css tweaks here.
Comment #3
Grantovich commentedFirefox 3 actually. Should've specified that. The widgets are a lot more native-looking since version 2. Although now that I check, the boxes are exactly the same width in Safari as well.
Just did some tweaking with Firebug and I got the boxes to stop breaking my layout by changing the width from
autoto100%. Unfortunately, on forms where the boxes have room to expand (like the content creation form), this causes them to take up all available space and be ridiculously long. For some reason it seems likeautois some arbitrary fixed size, when you'd think it would work more like a max-width kind of thing.Comment #4
karens commentedI shortened it up some and added a way for the API to control the size of that box that could be used in the future to give the end user more control. I didn't implement a way to control it right now because the UI is already pretty cluttered. We'll try this fix first.
Comment #5
Grantovich commentedWait, sorry, this has nothing to do with Date Popup; I'm not even using that field type. This is just with the regular freeform date input box. The page source informs me that the size of this box is being set to 60, if that helps (the most recent release didn't change this).
Comment #6
karens commentedWell nothing changed in that type of date field, so I don't know why anything would 'suddenly' have happened, unless you're using a new or different browser and suddenly saw the effect.
The default size of a textbox in Drupal is always 60. That's set by Drupal unless I override it, which I never have done with the plain textfield since there's no way of knowing how big that box needs to be. It could be set up to expect a very long input format, like 'Saturday, December 31, 2008 12:30:00PM' and there has to be room for that. Basically this kind of date is always going to take up a full line in the form.
So this is not a 'bug', it's the expected behavior.
There are ways to get around this with css (you sometimes need to set the element to display:inline to get it to shrink). I suppose it could be a feature request to have a way to shorten that box, but I don't want to clutter up the UI with too many options and there are already a lot of them, so I'd have to think about that.
Comment #7
Grantovich commentedHmmkay. For anyone else who comes across this, I managed to fix the layout breakage by using this CSS:
This modifies the width of the date input only when it appears in the view with the class "view-search-nodes". It doesn't do anything about the Default field in the view editing interface, but that's a back-end thing and I'm the only one who sees it anyway.
Comment #8
crutch commentedWhen using "Add another item" to date field on the node, the input fields for date and time seem to need a more granular class or id which I think would solve this problem as well.
When styling for administration we are unable to control the width of the input fields. Well we can but we would have to css each potential scenario.
but we don't know how many potential "Add another item" will happen. It could be 1 it could be 20.
If the input fields it would be great to have a general but unique class for date input and then for time input fields. Then we would be able to specifically size them no matter the number of fields added.
The full field html looks like this not having added another yet.
where we could have for the input a class, the parent id of the overall date field, but date would have a general class of .date, and time would have a general class of .time and use the specific parent id #edit-field-visit-choice
so we could use this css and it would apply to all that are added
Comment #9
crutch commentedscreenshot of field when in administration