Giter VIP home page Giter VIP logo

calendarize's People

Contributors

abryrath avatar fvaldes33 avatar incraigulous avatar j-greig avatar spoeken avatar timoschwarzer avatar tomkiss avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

calendarize's Issues

Option to change time to 15 minute increments and different times for multiple day events

Hi,

I have a client that runs single day and two day events. But in the example of the two day events, Day One is 10:15 to 18:00, while Day Two is 10:15 to 16:00.

Would it be possible to have day timings to be set based on how many days an event spans?

Also, as you'll notice above, the days start at 10:15, whereas the plugin currently only has 30 minute increments for the times.

Love the plugin other than this. Just replaced some over-complicated matrix fields.

Thanks!

Field preview in tables

Currently the field preview in element tables doesn't respect the language settings of the user. Also it could be simpler without "Next occurrence" and seconds.

70544508-787b8400-1b6c-11ea-835e-3ce1c4ea6871

How to search entries with calendarize

I'm creating a searchable events listing, but I'm not able to get search working.
Here's a minimal example of what I tried to do in Twig, but I end up with an error.

{% set entries = craft.calendarize.upcoming({ section: ['Event'],
search: 'Birthday' }, 'asc|desc') %}

And I ended up with this error:

Caused by: PDOException
SQLSTATE[42S22]: Column not found: 1054 Unknown column 'calendarize44a1a8733e.startDate' in 'where clause'

I've got category and date filters working fine, but I haven't been able to get text search working.

How to get events for a certain year

How do I accomplish the following:

I have 12 single-day events, all yearly repeating:

  • 1 jan 2012
  • 1 feb 2012
  • 1 mar 2012
  • 1 apr 2012
  • 1 may 2012
  • 1 jun 2012
  • 1 jul 2012
  • 1 aug 2012
  • 1 sep 2012
  • 1 oct 2012
  • 1 nov 2012
  • 1 dec 2012

Now, to get all entries for the year 2023 and display their exact dates:

{% set entries = craft.calendarize.between('2023-01-01', '2024-01-01', { section: ['events'] }, 'asc') %}

This gets all relevant entries, how to display their dates?
This seems not possible ATM?

PHP Fatal Error – yii\base\ErrorException

Hi!

After adding the plugin via composer, make a calendarize field and adding this field to a channel section entry, I get the following error after trying to save the entry:

yii\base\ErrorException: Method unionco\calendarize\models\CalendarizeModel::__toString() must not throw an exception, caught TypeError: Return value of unionco\calendarize\models\CalendarizeModel::__toString() must be of the type string, object returned in /Applications/MAMP/htdocs/wortstellwerk/vendor/craftcms/cms/src/helpers/StringHelper.php:0 Stack trace: #0 [internal function]: yii\base\ErrorHandler->handleFatalError() #1 {main}

Front-end submission

Hi guys,

This is not an issue but a question, before I try to figure all this out myself only to find out it can't be done: Would it be possible to use these recurring dates when using a front-end form for users to submit an event?

Cheers!

Not able to get all events - first is missing

If I try to get all my events with the following code
{% set entries = craft.calendarize.between('2020-01-01', '2020-12-31', { section: ['events'] }, 'asc') %}
i only get the occurences without the next occurence on 4.4.

image

Bildschirmfoto 2020-03-27 um 13 39 51

Is it possible to get a list with really all occurences including the first one with one query?

Thanks for your help!

Pagination of upcoming

I was wondering if there was a way to paginate upcoming events - i tried the following:

{% set order = 'asc' %}
{% set unique = true %}
{% set events = craft.calendarize.upcoming({ section: ['events'],limit: 3 }, order, unique) %}

{% paginate events as pageInfo, entries %}
{% for entry in entries %}
//do stuff here
{% endfor %}

But i get the error along the lines of Argument 1 passed to craft\helpers\Template::paginateCriteria() must implement interface yii\db\QueryInterface, array given, called in....

Is there a way i can get paginated upcoming events?

Ability to add custom recurring dates

I love being able to add recurring for every nth day or nth day of the week! But sometimes the events we have aren't as regular for instance every holiday there is a sale:
Memorial Day (May 30)
July 4th
Labor day (Sept 6)
etc...

Correct Docs

Can we change documentation from:

{% set occurrences = event.calendarizeHandle.getOccurrences(limit = 10) %}

Which will give error to:

{% set limit=10 %} {% set occurrences = event.calendarizeHandle.getOccurrences(limit) %}

Took me a while till I went through all of the combinations to get it right, lets make it easier for others.

Change format of dateTime.readable

Is it possible to change the formatting of the dates within{{ entry.dateTime.readable }}?
Also potentially the formatting of the wording/terminology?

Ongoing occurences

Is there a way to get ongoing events? Ie events that has a start date in the past, and an end date in the future.

Feature request: Admin translation

Is it possible that we can add our own translations for the plugin (labels like "All Day" for example) ?
e.g. in translations/<language>/calendarize.php

No localisation when using calendarizeHandle.next.format

Using the latest version 1.2.3

Bug

{{ event.calendarizeHandle.next.format('j F Y') }} returns 20 march 2019 in English.

Expected

Should return the system-translated 20 maart 2019 (if the system language is Dutch).

Workaround

Use {{ event.calendarizeHandle|date('D. j F Y') }}

Error when revisiting event

I've been playing around with this plugin (which is exactly what i needed, and looks great!). I saved an event, and when i try to view my entry again in the admin, i get the following error:

calendarize-screenshot-error

Unfortunately i can't access the entry to outline all the options i had turned on, but i had added in repeating, an end repeat, date exceptions and time exceptions.

Unsure if related, but typing in a date exception or time exception, gives the day as undefined unless the entry is then saved, at which point the correct day is displayed:

image

I've tried recreating the error with other entries, and so far i can't (they save fine and i can view them again without issue). I'm not sure if it's some combination of settings i have added, or maybe exception dates being outside the dates the recurring event is running or something like that?

Changing a day from 'times' to 'all day' doesn't clear the times

Hey, thank you for this plugin! I'm currently working with it to try and show store opening times.

I have some code which is displaying all the start and end times for event occurences. If that data is changed from having a start/end date to "All Day", the start/end times are still saved, and the front end doesn't correctly update.

Example:
image
Outputs:
image

Change that to the following and save it:
image
And it still outputs:
image

// refb
{% set occurrences = store.openingTimes.getOccurrences(10) %} {# limit is optional and defaults to 10 #}
{% set occurrences = store.openingTimes.getOccurrencesBetween('2019-09-01', '2020-10-01', 10) %} {# limit is optional and defaults to 1 #}
{% for occurrence in occurrences %}
	<p>Start: {{ occurrence.start|date('d M Y H:i l') }} / End: {{ occurrence.end|date('d M Y H:i') }}</p>
{% endfor %}

Date Exceptions "undefined"

There's something weird going on with the Date Exceptions field.I think this is something to do with the difference between American / English dates, but I'm getting "Undefined, {d/m/Y}" when I select a Date Exception on some repeating entries:

For example, selecting Weds the 4th of September gives me this:

image

Thursday, Oct 3rd:
image

October 18th:
image

22nd November:
image

craft.calendarize.upcoming is not working for me

I'm trying to use your standard method for listing upcoming entries like this; {% set entries = craft.calendarize.upcoming({ section: ['events'] }, 'desc') %} for I'm getting a Twig runtime error:

Calling unknown method: craft\elements\db\CategoryQuery::next()

events is the name of the section I'm attempting to list entries from, just to confirm.

Element query sort by calendarizeHandle possibility?

Hi!

Is it possible to sort a ElementQuery in Twig by the calendarizeHandle like so?:
{% set items = craft.entries.relatedTo('events').orderBy('calendarizeHandle.startDate asc').limit(5).all() %}

I want to get the related entries ordered by the startdate of the event.

startDate/endDate throws "unknown property" inside for-loop

Hello, I am looping through occurencies like this, successfully retrieving the next occurence in my template as time (eg. 10:00 pm):

{% for occurrence in occurrences %}
  {{ occurrence.next.format('h:i a') }}
{% endfor %}

However, now that I want to have the ending time displayed to ("10:00 pm – 11:00 pm"), using {{ occurence.endDate|date('Y-m-d') }} throws a templating error, same with using the startDate query:

Getting unknown property: craft\elements\Entry::endDate

What am I doing wrong?
I assume that being inside that for loop, I should be able to flexible output stardDate and endDate as flexible as it works with next?

Day of Week recurring entry not working correctly

I tried to set a recurring event that starts on 04/02/19. The event is supposed to recur on the first Tuesday of each month, however, the plugin reads 04/02/19 as the last Tuesday of the month and 04/09/19 as the first Tuesday of the month. It seems like this is caused by 5 Tuesdays in the same month.

Trying to display events by; 'this week', 'next week', 'beyond' etc

I am attempting to list out events grouped by this week, next week and beyond. I can get this working with a native custom date field like so:

{% set thisWeek = day|date_modify('this Sunday')|date('Y-m-d') %}
{% set nextWeek = day|date_modify('next Monday')|date('Y-m-d') %}
{% set followingWeek = day|date_modify('next Monday +7 days')|date('Y-m-d') %}
{% set eventsThisWeek = craft.entries.section('events').dateFrom(['and', '<= ' ~ thisWeek ]) %}
{% set eventsNextWeek = craft.entries.section('events').dateFrom(['and', '>= ' ~ nextWeek, '<=' ~ followingWeek ]) %}
{% set eventsBeyondNextWeek = craft.entries.section('events').dateFrom(['and', '> ' ~ followingWeek ]) %}

But as I'm now trying to use the lovely Calendarize the above is no good to me so I've tried variations on to use dateTime.startDate instead:

i.e. {% set eventsThisWeek = craft.entries.section('events').dateFrom(['and', '<= ' ~ thisWeek ]) %}

This gives me errors of:

Impossible to invoke a method ("startDate") on a null variable.

I'm obviously not doing something right or maybe it isn't possible?

Any ideas?

Bug: Queries with additional criteria return unexpected results

There is a problem when using additional criteria on queries, like limit:

{% set entries = craft.calendarize.upcoming(
  {
    section: ['events'],
    limit: 4
  }
) %}

This results in 2 errors:

  1. Only one result returned. Expected result: 4.
  2. The order of resulting entries is not the chronological order of the events.

If more information is needed, don't hesitate to ask!

Entry not saving repeating dates, days of week

I've just updated an event which is a repeating (weekly) entry to change/remove some days of the week, but upon saving it's still showing the previously selected days.

Other fields save and update correctly.

How to show events older than today only?

Hi! I've got Calendarize working for part of an Events section on a site. The other section is to show all event prior to today, but paginated. I have it partially working with Craft's paginate tag, but it currently returns ALL entries (as expected).

I'm not sure how to tweak the code to get it to:

  1. limit it to events/entries that are older than today (based on the event start date, not the post date)
  2. get the events/entries to be ordered in reverse chronological order.

Any tips?

Setting unkown timezone property?

Throwing this error in the control panel when adding a date exception, THEN saving the entry.

Setting unknown property: craft\behaviors\CustomFieldBehavior::timezones

Removing any date exceptions removes this error and allows us to save the entry.

We are using Calendarize inside a Super Table
Craft Pro 3.4.5
PHP 7.1.16
MySQL 5.5.5
MariaDB 10.1.32

Repeat monthly date format bug

Found a bug within the repeat monthly. It seems like it's using the American date format, m/d/y rather than d/m/y. Selecting a date over the 12th day in a month will cause the 'Every month on the' dropdown to display 'NaNth' and 'undefined undefined'

Selecting the date 12th April 2019, which is a Friday, populates the dropdown to display 'First Wednesday' even though it's the second Friday. It's looking at the 4th December 2019 which is the first Wednesday.

Is there a setting we can add to a config file to change the date formatting?

Adding empty Time Exceptions cause error

It would be nice to prevent the possibility of adding an empty Time exception (empty date + empty time).

On add, a new line with this value is shown: undefined,. Then, this error is shown on save: Call to a member function format() on null.

And this could caused another cascading issues. For example, after save, I wasn't able to show anymore the current entry section from the CP: An unknown error occurred (from admin/actions/element-indexes/get-elements request). Solution was to edit the entry from the DB (clear the timeChanges column).

calendarizeHandle.next: backward compatibility issue

Using the latest version 1.2.3

Bug

{{ event.calendarizeHandle.next|date('D. j F Y') }} now returns error
Object of class unionco\calendarize\models\Occurrence could not be converted to string

Expected

In previous version, this returned Fr. 15 februari 2019

Workaround

Use {{ event.calendarizeHandle.next.format('D. j F Y') }}
or {{ event.calendarizeHandle|date('D. j F Y') }}

Error: Call to a member function setTime() on boolean

I created an event, repeating weekly on a monday, starting a week in the future. Saved it, all good. I went back to view the entry in the admin, and got the following error:

Error: Call to a member function setTime() on boolean

From then on i had to delete the entry, as i couldn't access it in the admin. Devmode is on, calendarize version 1.2.16.

Unfortunately i can't recreate it at this stage, but i've included a screenshot of the error in case anything jumps out at you or someone else reports a similar issue.
image

Confusing onMonthDay option

If you create an event on the last monday of April (27th) and select the option to repeat it monthly, the dropdown says "Last Montag" (our installation is in German). After saving the event the dropdown options changed to "Fourth Monday" and the dates for June and August are not the last Monday (because they have five Mondays).

If you use the 30th of March as starting date (which is a 5th Monday), the dropdown says "Last Monday" after saving and all repeating dates are correct on the last Monday (ether the fourth or fifth).

We have events both with $Xth weekday and last $weekday of the month.

Feed Me compatibility

I was wondering if Calendarize is compatible with Feed Me, and if so, how should the data be structured?

Feature Request: "unique" attribute for calendarize.upcoming queries

First of all, thanks for a great plugin. I love the upcoming query option, but in a few cases, I need to get a list of unique upcoming events, e.g., with only the next upcoming instance of a repeating event---so that each event entry is listed once in the result set. I don't see a "calendarize" way of doing that. Am I missing something obvious or could this be a candidate for a new feature?

Entries that span multiple days cannot access end date

@janmeeus - Opening a new ticket for these other issues

When adding a yearly occurrence that lasts several days (e.g. 20-02-2019 to 24-02-2019), I can only display the startDate of the next occurrence ({{ event.calendarizeHandle.next }}), but not the endDate of the next occurrence.

Impossible to access an attribute ("startDate") on a null variable in "__string_template__

I'm getting this very strange error on pages that don't relate to Calendarize ever since I installed it.

The full error is:

Impossible to access an attribute ("startDate") on a null variable in "__string_template__72438934248b0d954161cc5bb0a7c4887491e74869a6418409c7eb1144d3966b" at line 14.

I receive it when trying to save entries that don't have Calendarize fields; when I do add them, I am able to save the entry without issue. It also occurs when editing a Section itself, despite not having anything to do with Calendarize (I think?)

Hope someone can help with this as it's really bugging me! :)

Fix Composer 2 compatibility

When installing this plugin with Composer 1, the following deprecation notice is output:

Deprecation Notice: Class unionco\calendarize\records\CalendarizeRecord located in ./vendor/unionco/calendarize/src/records/CalendarRecord.php does not comply with psr-4 autoloading standard. It will not autoload anymore in Composer v2.0.

Composer 2 was released on October 24, and is now the default version that will be installed, so it’s critical that this gets resolved ASAP, or people will start getting Class not found errors.

To fix, run the following command:

> git mv src/records/CalendarRecord.php src/records/CalendarizeRecord.php

Then commit your change and tag a new release.

(Note that you must use the git mv command, as Git tends to not notice case-sensitive file renames otherwise.)

Wording of the repeat frequency field

I was just noticing that the wording of the repeat fields is awkward (for English, anyways):
Screenshot of the repeats field

"Repeats every daily" is incorrect.
"Repeats every day" is correct.

Probably better to either:

  1. Change the label 'Every' to 'Repeat frequency' (or similar), OR
  2. Change the names of the values so they make sense, i.e. day/week/2 weeks/month/year instead of daily/weekly/biweekly/monthly/annually.

I think I would go for option 2 since it's also more clear (no need to explain that biweekly is every 2 weeks rather than 2 times per week, for example).

"Could not save field."

Getting "Could not save field." without any error message under any inputs when creating/editing existing calendarize-fields after latest plugin update. Can't find anything in the error logs either.

FR: GraphQL support

With GraphQL now included in Craft, it would be great if we could retrieve events using this interface. Maybe this would be a good opportunity to create a paid edition of the plugin for the support of pro features.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.