Paul

Forum Replies Created

Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • Paul
    Participant

    date_default_timezone_set(“America/New_York”);
    $local_start_date = tribe_get_start_date( null, true , ‘y-m-d H:i:s’ );

    $date = new DateTime( $local_start_date );

    // Calculate PST Start DateTime and set var
    $date->setTimezone(new DateTimeZone(‘America/Los_Angeles’));
    $start_datetime_pst = $date->format(‘Y-m-d H:i a’);

    // Calculate GMT Start DateTime and set var
    $date->setTimezone(new DateTimeZone(‘Europe/London’));
    $start_datetime_gmt = $date->format(‘Y-m-d H:i a’);

    // Calculate CEST Start DateTime and set var
    $date->setTimezone(new DateTimeZone(‘Europe/Paris’));
    $start_datetime_cest = $date->format(‘Y-m-d H:i a’);

    print( “PST: ” . $start_datetime_pst . ” GMT: ” . $start_datetime_gmt . ” CEST: ” . $start_datetime_cest );

    In the end I had to settle for displaying a selection of international dates (server is based in EST) and printing them. The above is my customisation of the ‘details’ meta component (not complete here but gives you an idea). It calculates times extrapolated from the event’s EST datetime and prints times in PST, GMT and CEST.

    You guys at minimum should really have a function call which does this – so you call tribe_get_start_date() with a timezone and it returns as required. Doing the above is somewhat laborious.

    Paul
    Participant

    Thanks Barry, although disappointed to see the feature has been open for over a year and still only ‘under review’. This is an online calendar, the assumption from the get go should have been people will automatically need to specify and control time zones of events.

    Anyway, as I’m going to have to try and workaround this shortcoming, I’m simply going to extend the plugins’s templates to append times in 2 other common timezones (PST and GMT). To do this I need to get at (at the ‘single-event’ and ‘meta’ template level) the current date and time for the event in question, so I can manually programatically convert and append the datetime alongside the ‘default’.

    What function calls are there to do this? Ideally I need the event’s date (on it’s own) and time (on it’s own) returned in some ISO compliant format.

    Thanks.

    Paul
    Participant

    Hi Jami,

    The wonderful folks over at TagDiv (NewsMah theme) spotted the issue this morning. Here’s the fix (this will probably affect others, although I’m not sure if it’s a pure bug in TEC):

    On click the datepicker div is set to display: none; this causes it to disappears.
    Try this custom css in theme’s panel custom css section and test if this still happens. From my test this css code solved this issue: http://screencast.com/t/OUU6bKZJ

    .datepicker.dropdown-menu {
    display: inline-block !important;
    }

    This is now implemented on the live site, hence all working.

    Thanks for your help.

    Paul
    Participant

    Thanks Jami, I’ve raised a ticket over at the NewsMag forum – thread can be found here in case you’d like to cross reference:

    http://forum.tagdiv.com/topic/newsmag-and-the-events-calendar-css-jquery-conflicts-with-date-picker/

    Let me know what you’re colleagues think on Monday.

    Thanks

    Paul
    Participant

    Sorry, more info. If you ‘mouseDown’ on the datepicker, then hold -> move cursor outside the date picker area -> release, the date picker stays visible and you can select your date.

    Again, I’d hope this gives support / developers a pretty good idea where to look. I’d be grateful for some assistance here.

    Thanks.

    Paul
    Participant

    OK, I think I’ve worked something out. The issue seems to occur when releasing the mouse button after clicking. If you keep it held, the data picker will continue to display and allow you to select dates. The onClick (or onMouseDown I’m not sure what you’re using) won’t work again until you’ve clicked away / de-focussed from the date picker area – at which point you TEC loads the ‘selected’ value and reloads the main calendar element.

    Can someone on the dev team give me an idea whether there’s a way to supress the ‘mouse button up’ event or whether this gives any leads as to my issues here?

    Thanks

    Paul
    Participant

    If we can’t resolve this issue, then could you suggest how we can bypass the jquery / CSS popup menu for something a little more compatible? Either by using basic dropdowns or other methods.

    Thanks

    Paul
    Participant

    Hi Jami,

    Do you think there’s any further assistance you can give us on this one – I’ve heard nothing further and we’re pretty stumped.

    Thanks!

    Paul
    Participant

    Hi Jami,

    It does indeed – in fact I disabled the bar to try and hunt down the issue.

    Indeed no obvious console errors, the only lead is that the menu pops up after clicking the search popout box. Can you tell if the element is switching from display: block; back to ‘none’ when the search bar is used?

    Unfortunately this kills TEC for us unless we can find a way through the issue.

    Paul
    Participant

    Hi Jami,

    Thanks for the quick response.

    As I say, I’m certain it is the theme which is to blame – I’m just looking for pointers on how to resolve the conflict. Nevertheless, I’ve cloned the live server to a beta site and switched themes, sure enough it no longer occurs.

    I appreciate you can’t support every theme out there, however you may be able to spot the conflict.

    One note – if you click the date search field (appears and quickly disappears) and then click the search icon on the menu bar, the date field appears. In fact, if you switch between tabs on the browser and then back it re-appears too.

    Thanks again and I appreciate the help.

Viewing 10 posts - 1 through 10 (of 10 total)