• Resolved Stever1

    (@stever1)


    I had my calendar set up to switch to list view on smaller screen widths. I had a duplicate calendar on a page. One in list view and one in grid view. I used CSS media queries to hide or show the appropriate one depending on screen width.(large screen displayed grid, small screen displayed list). This worked fine when the URL string contained cid=all. With the updated version of my calendar cid is now a long string of characters that is different for list and grid views. Now when I re-size the window to switch from one view to the other the calendar no longer works.

    Any suggestions?
    Thanks,
    Steve

    https://wordpress.org/plugins/my-calendar/

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

    (@joedolson)

    What was your media query using to hide/show? Was it based on the calendar ID?

    You can still pass a custom ID to the calendar which will override that, using the shortcode ‘ID’ attribute; but you should also be able to use classes, since the list and grid view of the calendar have different classes.

    Thread Starter Stever1

    (@stever1)

    I’m using classes. Calendar class for grid view and list class for list view.

    To see the problem I’m experiencing go to:
    http://allayn.com/calendar/
    Make sure the browser window is large enough to display the grid view. Change the date(from August to July for example). Then re-size the window down till you see the list view. The date picker will still be July but the events displayed will be for August. You can now change the month or year but the events displayed will always be for August. If you re-size back up to till you see the grid view it will work fine again.

    Plugin Author Joe Dolson

    (@joedolson)

    I see – that’s unusual. You’ve got it set up so that the controls *should* control both calendars. The ID change I made was actually to fix for that exact problem, for most people, who wanted to make sure that any given set of controls only controlled one calendar.

    But you should be able to resolve this by using the ID attribute and giving both calendars the same ID.

    Thread Starter Stever1

    (@stever1)

    That’s awesome! Using the same id attributes worked.

    Yeah my approach is a little hackish. I’m not the greatest developer and I couldn’t think of a better way to switch between list and grid based on window width.

    Thanks for your help!!!

    Plugin Author Joe Dolson

    (@joedolson)

    I thought that was a pretty smart solution, actually. I hadn’t thought of it!

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘New URL string problem’ is closed to new replies.