I am utilizing a combination of Solspace 'Calendar', 'Playa', and 'Google Maps for ExpressionEngine'. I'm having a strange issue where the dates aren't showing up correctly in my infowindows on the Google Map, but they show up fine using the same code outside of the infowindow.

So, I have a 'Location' channel, and an 'Event' channel. The Event channel is associated with the Calendar module, and uses a Playa single relationship field to relate it to a Location.

I am adding markers to the map for every 'Location', and for each marker, I'm populating the infowindow with the Location details. this includes using the Playa:Parents method to show all of the events that are at that location. 

I copied the code from the Solspace Calendar demo template for a single event to show the event date, because it had all the conditionals all worked out to deal with single day or multi-day events well. 

My problem is that in the infowindow, it's only showing the 'From' date, and not the 'To' part of the date string. It shows it correctly when I output it outside of the map, though. Here is the code that is outputting the date information. 

    {exp:calendar:events}
    &lt;b&gt;From:&lt;/b&gt; {event_first_date format="%F %j, %Y at %g:%i%a"}
    {if event_never_ends}
        (never ends)
    {if:else}
        {if "{event_first_date format='%Y%m%d%g%i%a'}" != "{event_last_date format='%Y%m%d%g%i%a'}"} &lt;b&gt;to:&lt;/b&gt;
            {if "{event_first_date format="%Y%m%d"}" != "{event_last_date format="%Y%m%d"}"}
                {event_last_date format="%l, %F %j, %Y at %g:%i%a"}
            {if:else}
                {event_last_date format="%g:%i%a"}
            {/if}
        {/if}
    {/if}
    &lt;a href="{path=find-music/event/{url_title}}"&gt;{title}&lt;/a&gt;
{/exp:calendar:events}


But this is how it outputs, in the infowindow, and outside of the map.

(crap, I don't have enough 'reputation' to post the image here, but it's here: http://paleosun.com/misc/stackexchange-map-calendar-question.jpg)

Notice, the section below the map has the "to" date. Same code is used to output it.

I have determined that something is going wrong with the quotes in the event date formatting tags. The {if "{event_first_date format='%Y%m%d%g%i%a'}" != "{event_last_date format='%Y%m%d%g%i%a'}"} part is never resolving to 'true' like it should. In fact, If I just try to output {event_first_date format='%Y%m%d%g%i%a'} in the infowindow part, nothing show up. However, if I use double quotes and output {event_first_date format="%Y%m%d%g%i%a"} it DOES work. The problem is, I cannot use that fix in the conditional, because double quotes are already being used around the output of that tag...

Any ideas why? Or what I can do as a work-around?

Here is all of my relevant template code:

{exp:gmap:init
    id="mainmap"
    class="gmap"
    style="height:600px;width:100%; border: 1px solid green;"
    center="United States"
    zoom="4"
}

&lt;div id="location-container"&gt;
    {exp:channel:entries
        channel="location"
        disable="member_data|pagination|category_fields"
        limit="9999"
        }

        {if loc_show_on_map == 'yes'}

            {exp:gmap:marker
                id="mainmap"
                latitude="{loc_latitude}"
                longitude="{loc_longitude}"
                geocode="false"
                clustering="true"
                infobox="true"
                show_one_window="true"
                class="ui-infobox-dark ui-infobox"
                offsetY="-45"
                offsetX="15"
                icon="{categories limit='1'}{category_image}{/categories}"
                }

                &lt;div style="width: 400px;" class="clearfix"&gt;
                    &lt;h3&gt;&lt;a href="{path=find-music/location/{url_title}}"&gt;{title}&lt;/a&gt;&lt;/h3&gt;

                    &lt;ul&gt;
                        {categories}
                            &lt;li&gt;{category_name}&lt;/li&gt;
                        {/categories}
                    &lt;/ul&gt;

                    {if loc_image}&lt;img src="{loc_image}" alt="{title} image" width="200" class="right" /&gt;{/if}
                    {loc_contact_first_name} {loc_contact_last_name}&lt;br /&gt;
                    {loc_street_address} {if loc_address_details}{loc_address_details}{/if}&lt;br /&gt;
                    {loc_city_town}, {loc_state} {loc_zip_code}&lt;br /&gt;


                    &lt;ul&gt;
                    {exp:playa:parents channel="calendar_events"}
                        &lt;li&gt;
                            {exp:calendar:events}
                                &lt;b&gt;From:&lt;/b&gt; {event_first_date format="%F %j, %Y at %g:%i%a"}

                        &lt;br /&gt;From:{event_first_date format='%Y%m%d%g%i%a'}
                        &lt;br /&gt;To: {event_last_date format='%Y%m%d%g%i%a'}!
                        Yes
                                {if event_never_ends}
                                    (never ends)
                                {if:else}
                                    {if "{event_first_date format='%Y%m%d%g%i%a'}" != "{event_last_date format='%Y%m%d%g%i%a'}"} &lt;b&gt;to:&lt;/b&gt;
                                        {if "{event_first_date format="%Y%m%d"}" != "{event_last_date format="%Y%m%d"}"}
                                            {event_last_date format="%l, %F %j, %Y at %g:%i%a"}
                                        {if:else}
                                            {event_last_date format="%g:%i%a"}
                                        {/if}
                                    {/if}
                                {/if}
                                &lt;a href="{path=find-music/event/{url_title}}"&gt;{title}&lt;/a&gt;
                            {/exp:calendar:events}
                        &lt;/li&gt;
                    {/exp:playa:parents}
                    &lt;/ul&gt;
                &lt;/div&gt;

            {/exp:gmap:marker}

            {!--
                custom javascript to add attributes to the markers
                for location type and music styles, so we can filter
                based on that
            --}
            &lt;script type="text/javascript"&gt;
                if(typeof newMarker!='undefined'){
                    newMarker.entry_id = {entry_id};
                    newMarker.music_styles = [];
                    {exp:playa:children field="loc_music_styles"}
                        newMarker.music_styles.push({entry_id});
                    {/exp:playa:children}

                    newMarker.location_types = [];
                    {categories}
                        newMarker.location_types.push({category_id});
                    {/categories}
                }
            &lt;/script&gt;
        {/if}

        &lt;div id="location-{entry_id}"  class="location-entry clearfix"&gt;
            &lt;h3&gt;&lt;a href="{path=find-music/location/{url_title}}"&gt;{title}&lt;/a&gt;&lt;/h3&gt;
            {if loc_image}&lt;img src="{loc_image}" alt="{title} image" width="200" class="right" /&gt;{/if}
            {loc_contact_first_name} {loc_contact_last_name}&lt;br /&gt;
            {loc_street_address} {if loc_address_details}{loc_address_details}{/if}&lt;br /&gt;
            {loc_city_town}, {loc_state} {loc_zip_code}&lt;br /&gt;

            &lt;ul&gt;
            {exp:playa:parents channel="calendar_events"}
                &lt;li&gt;
                    {exp:calendar:events}
                        &lt;b&gt;From:&lt;/b&gt; {event_first_date format="%F %j, %Y at %g:%i%a"}
                        {if event_never_ends}
                            (never ends)
                        {if:else}
                            {if "{event_first_date format='%Y%m%d%g%i%a'}" != "{event_last_date format='%Y%m%d%g%i%a'}"} &lt;b&gt;to:&lt;/b&gt;
                                {if "{event_first_date format="%Y%m%d"}" != "{event_last_date format="%Y%m%d"}"}
                                    {event_last_date format="%l, %F %j, %Y at %g:%i%a"}
                                {if:else}
                                    {event_last_date format="%g:%i%a"}
                                {/if}
                            {/if}
                        {/if}
                        &lt;a href="{path=find-music/event/{url_title}}"&gt;{title}&lt;/a&gt;
                    {/exp:calendar:events}
                &lt;/li&gt;
            {/exp:playa:parents}
            &lt;/ul&gt;
            &lt;hr /&gt;
        &lt;/div&gt;
    {/exp:channel:entries}
&lt;/div&gt; &lt;!-- /#location-container --&gt;



Question: Client Object Model - How can I access a List using relativeServerUrl
Answer: Try this:

public List GetListByRelativeUrl(String relativeUrl)
   {
       List existingList;

       Web web = context.Web;
       ListCollection lists = web.Lists;

       IEnumerable&lt;List&gt; existingLists = context.LoadQuery(
               lists.Where( list =&gt; list.RootFolder.ServerRelativeUrl == relativeUrl)
               );
       context.ExecuteQuery();

       existingList = existingLists.FirstOrDefault();

       return existingList;
   }


Each list has a root folder - you can find it by using the ServerRelativeUrl property.