5
votes
Accepted
List Only Available Times/Dates in Solspace Calendar
Edited to provide a cleaner solution:
This code will display different contents for available times and unavailable times in 30 min increments, and makes no assumption on how long your events are.
{%...
4
votes
Accepted
How do I differentiate between entries after merging an array?
Not sure if I totally got it but you can check the class of an object via
{% if element is instance of ('craft\\elements\\Entry') %}
or via switch statement
{% switch className(element) %}
{% ...
4
votes
Not able to contact Solspace support
Sorry about the trouble. We typically answer most tickets within 24 hours:
Freeform: https://solspace.com/craft/freeform/support/
Calendar: https://solspace.com/craft/calendar/support/
If the ...
3
votes
Accepted
How to determine if there are events in a calendar?
Looking at the docs you can search for events for a certain calander by including the id or the handle in your query.
{% set calendars = craft.calendar.calendars({
limit: 100,
order: "name",
...
3
votes
Get repeated events with the Solspace Calendar and Element API plugins
Unfortunately this won't be possible with Solspace Calendar since we are extending ElementCriteria with Calendar_EventCriteriaModel, which has a layer on top of it allowing us to build recurring ...
3
votes
Accepted
Daylight Savings How?
If I'm understanding correctly, the three dates should all appear as the same time on the frontend, as if there was no regional time change?
You can do this by using Calendars .format() method on ...
2
votes
Accepted
Create Solspace Calendar Event on Commerce onOrderComplete
To listen to Craft Commerce order save event, you must make a new plugin (or use an existing one) and in it's ::init() method, listen to the commerce_orders.onSaveOrder event:
class TestPlugin ...
2
votes
Accepted
Solspace Calendar Locations
There currently isn't any built in Location field for Calendar. We made add something like that in the future, but for now you can definitely use other third party field types such as VZ Address to ...
2
votes
Accepted
Using Solspace Craft Calendar plugin, how can I get random events within a defined timeframe?
UPDATE: This issue has been fixed as of Calendar 1.8.4 on April 21, 2017.
https://solspace.com/craft/calendar
Your above code should work. I think there might be a bug with the loadOccurrences: false ...
2
votes
Accepted
Solspace Calendar For Craft CMS - Importing ICS Files
Sorry, Calendar currently does not allow for importing of any events via ICS or other means.
source: Kelsey Martens, Director of Software Operations
2
votes
Accepted
Solspace Calendar: custom fields not outputting
This is a known issue and will be resolved in Beta 4 coming out today (March 15, 2018). Sorry for the trouble.
2
votes
Accepted
Is it possible to reassign an existing event from one Solspace Calendar to another ?
This currently isn't built into Calendar, but if your calendars use the same fields, you should be able to manually adjust the calendarID column in the craft_calendar_events database table. Otherwise, ...
2
votes
Accepted
How to suppress display of expired entries in Solspace month calendar?
The solution is to wrap the event output in a conditional that compares the event startdate to now. I've updated the question to reflect this.
2
votes
Not able to contact Solspace support
Try contacting them on the Craft CMS Slack workspace. They have an account on there, it's worked for me in the past!
2
votes
Accepted
Selling tickets to repeating events with Commerce (and Solspace Calendar?)
I think you will have to get your hands a bit dirty with this one.
The Calendar Events fieldtype will get you part of the way, but you still need some module code to pull this off.
A suggested ...
2
votes
Accepted
Solspace Calendar Event Editing
You'll want to make sure you include all of the Calendar field inputs in order for this to work. If you're trying to hide them for your workflow, you can set the fields to hidden, or wrap them in a ...
2
votes
Accepted
Creating a calendar event from within a plugin (stuck on saving)
I got help on Discord. The way to do it was Calendar::getInstance()->events->saveEvent($event); Edit: DateTime also needs to be replaced with Carbon()
2
votes
Reverse related entry with Solspace Calendar
after reading and re-reading the docs got this working:
{% set relatedDates = craft.calendar.events.relatedTo(entry).all() %}
{% for relatedEventEntry in relatedDates %}
{{ relatedEventEntry.title }}...
1
vote
How do I assign a language to all datetime outputs
Thanks to Kelsey Martens of solspace I found the key. The solspace demo calender uses the .format() method which doesn't translate to the sites language. Now I use the |date filter instead which ...
1
vote
Is it possible to add an entries field to recurring events that can be changed per occurrence?
Calendar's event recurrences are only simulated/inflated by a repeat rule for the main event. Since there is no database entry for each recurrence, there's unfortunately no way to achieve something ...
1
vote
Accepted
Advanced sorting of events with database expressions (Solspace Calendar)
I emailed Solspace support about this and had an answer:
Unfortunately it's not possible to have the SQL order events like you need, because after the SQL fetches the events, we have to hydrate all ...
1
vote
Relating to Solspace Calendar Events
After experimenting with syntax a bit I made it work, looks like it needs an id, but it doesn't work with the event as an object.
So this works:
{% set reviews = craft.entries.section('reviews')....
1
vote
Relating to Solspace Calendar Events
You can use them the same way like you are used to everywhere else. All relation fields extend the same BaseRelationField so their logic is totally equal.
You can either pass an element, an element ...
1
vote
Accepted
Eager load elements from Solspace Plugin
Currently Calendar does not support eager loading, but it's much more likely the Craft 3 version will in the future, as we refactored a lot of code and tried to somewhat "normalize" the code to work ...
1
vote
Solspace Calendar (2.0.0-b9) returning template not found error in CP
Have you checked what values you have for the calendar(s) under the Site Settings: Event URI Format & Template
It's possible you might have something incorrect there. Perhaps the Template path ...
1
vote
Is there a way to output the events that belong in a month after a specific date using the Calendar plugin by Solspace?
The calendar.month function is designed to only display complete months, so as long as you specify a date, it's going to show you events for that whole month (before and after).
What you're looking ...
1
vote
Accepted
Is there a way to retrieve the last date of an event using the Solspace calendar plugin?
It turns out that the Calendar plugin provides a property named event.repeating that can be checked to determine if the event is repeating and then use event.readableRepeatRule property to output the ...
1
vote
Is there a way to retrieve the last date of an event using the Solspace calendar plugin?
Do you mean this?
{% set eventOptions = {
dateRangeStart: targetStartDate,
dateRangeEnd: targetEndDate,
limit: 15,
search: "EndrepeatHandle:On date"
} %}
{% set events = craft....
1
vote
Accepted
Calendar month view error
UPDATED RESPONSE...
We were finally able to get to the bottom of this and traced the issue down to your site likely having a DateTime field with the handle date, and this was apparently something ...
1
vote
Solspace Calendar: Export a single event
There's a definitely a syntax error in your first line.
({
loadOccurrences: false
})
should be:
{
loadOccurrences: false
}
Also, from their docs, the export method only shows one parameter ...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
plugin-solspacecalendar × 48solspace × 21
craft3 × 13
events × 5
templating × 4
calendar × 4
plugin-development × 3
relations × 2
datetime × 2
editing × 2
plugin-calendar × 2
plugin-craftcommerce × 1
plugins × 1
database × 1
plugin-elementapi × 1
plugin-craftcommerce2 × 1
plugin-freeform × 1
conditional × 1
query × 1
javascript × 1
custom-field × 1
ordering × 1
sorting × 1
plugin-smartmap × 1
plugin-charge × 1