Viewing 9 replies - 1 through 9 (of 9 total)
  • Plugin Author Joe Dolson

    (@joedolson)

    Can you tell me what the context is? Upcoming events, details, etc.?

    Thread Starter ac1643

    (@ac1643)

    Hi, thanks for getting back quickly, apologies for the delay.

    When I have all-day selected I get this display on the calendar sidebar widget:

    N/A, June 4, 2015 – Archive Project is published.

    I can change the N/A to something else, but I would prefer to just show:

    June 4, 2015

    I saw something about N/As in another support thread so this may have been covered, but if you could help me out it would be appreciated.

    Plugin Author Joe Dolson

    (@joedolson)

    I’d recommend changing your all day text field to blank (you can do this in the My Calendar settings), then changing the time and date section of your template to

    {timerange after=", "}{daterange}

    Thread Starter ac1643

    (@ac1643)

    Thanks, I tried leaving the all day text field blank but it automatically reverts to NA.

    When you say about changing the time and date section in the template, do you mean the template editor, script editor or style editor? I looked at the template editor but it seems to be an alternative view for the grid layout. If the changes to be made are in here, what exactly do I change? Below is what appears in the template editor:

    <span class=”event-time dtstart value-title” title=”{dtstart}”>{time}<span class=”time-separator”> – </span>{endtime before=”<span class=’end-time dtend’ title='{dtend}’>” after=”</span>”}</span>

    <div class=”sub-details”>
    {hcard}
    {details before=”<p class=’mc_details’>” after=”</p>”}
    <p>{title}</p></div>

    Plugin Author Joe Dolson

    (@joedolson)

    I’m referring to the widget template, which you set in the widget settings at Appearance > Widgets.

    You might need to set the n/a value to a single space.

    Thread Starter ac1643

    (@ac1643)

    Brilliant, everything is now working fine.

    Thanks for your fast responses. Great support for a great plugin, really appreciate it.

    I had all-day events in the upcoming events widget showing:
    N/A, April 1, 2015 - April 2, 2015

    I was also unable to remove the N/A as it would default back to N/A when I click Save, and I found that putting a space instead of N/A still showed as:
    , April 1, 2015 - April 2, 2015

    Then I figured out how to clear the event end date field… Which you have to do EVERY TIME you edit the event because after you clear the end-date field and save, it puts a date back into that field! (… even though it is saved & shows on the calendar without an end date.)

    Finally I changed the widget template to:
    <strong>{daterange}</strong> {timerange after=", "}<BR> – {linking_title}
    and now it shows it how I wanted with the exception that there’s an awkward space and comma after the Date when no time-range is specified (like in all-day events).

    Just thought I’d toss out my observations in case they help anyone and also to inform the author of some minor awkwardness of the interface.

    I’ve just started playing with the Plugin today, but so far it seems like a really good Calendar & widget. Thanks!

    EDIT: I played with the code and found that removing the after", " part removed the awkward comma. Cool! Still figuring out how all this code works!

    Plugin Author Joe Dolson

    (@joedolson)

    All events always have an end date, whether you can see it or not. This is because all of the calculations assessing when an event starts and ends (which are necessary for producing upcoming events lists, today’s events lists, and the current event shortcode) depend on that data.

    So, you may *think* you’ve removed the end date, but you haven’t. The default end date is the same day as the start day, unless the event is an all-day event; in which case it ends at midnight the beginning of the next day.

    For the record, that’s something that will change in version 2.4.0; in 2.4.0, I’ll be returning to the model where all day events end at 11:59pm the same day, which was much simpler to understand and work with.

    The “after” template parameter adds the comma only if the template tag returns a value; but that can include an empty space. There are a lot of template tag options, so you should explore the template tags listed on the Help screen to see what’s ideal for you.

    Thanks!

    Yeah, I found it a bit confusing that my one-day event was listed as April 1 – April 2. I think going to 11:59 would be much better. I’ll look forward to that release. Thanks!

    After playing with the template text a bit, I started to figure out how it works and I like it. I like that I could use html and css code to format things and make them look better – how I wanted it. I’ll definitely check out that help screen if I can find more info about it there!

    I wish that I could also apply formatting like Bold, center, or text color to the Widget Title. Just a little something if you’re looking for ideas.

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Remove time element when event is all-day’ is closed to new replies.