My field info is displaying in 2 line :

Opening:
Thu, 10/01/2015 -
18:00 to 21:00

I want it to display only in one line :

Opening:
Thu, 10/01/2015 - 18:00 to 21:00

Please see attached image.

Can any css guru tell me what code should I use for my css file ? Thank you

CommentFileSizeAuthor
date.jpg33.42 KBfreelylw
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

freelylw created an issue. See original summary.

mollyavalon’s picture

I have the same behavior in a view showing events since updating to 7.x-2.9. The date and time is displayed on one line if no end date is shown, but two lines if the end date (in this case, end time) is shown.

Here's what the HTML looks like:

<div class="field field-name-field-date field-type-datetime field-label-hidden view-mode-full">
<div class="field-items">
<div class="field-item even">
<span class="date-display-single">
Saturday, October 17, 2015 -
<div class="date-display-range">
<span class="date-display-start" content="2015-10-17T13:00:00-05:00" datatype="xsd:dateTime" property="dc:date">1:00pm</span>
to
<span class="date-display-end" content="2015-10-17T15:00:00-05:00" datatype="xsd:dateTime" property="dc:date">3:00pm</span>
</div>
</span>
</div>
</div>
</div>

I did a little workaround in the view:

  1. Change the date display to show only Start Date.
  2. Hide that field.
  3. Add another date field showing only End Date.
  4. Rewrite the results of the second date field as [field_date] to [field_date_1]

Not ideal, but I have no idea how to fix it for real.

hmarshall’s picture

I had the same problem today and fixed it with css:

.node-event .date-display-range { display: inline; }

The ".node-event" was added to restrict this to a single content type. It's optional.

Peter Arius’s picture