I just learned about the new Smart Date module (https://www.drupal.org/project/smart_date) which is an effort to improve on core Date Range.

I tried it out with FCV but couldn't get data from Smart Date fields to display in the calendar. I'm wondering if the issue is that Smart Date stores date/time info as timestamp, not as datetime. If so, I have no idea what the degree of difficulty is for FCV to support timestamp values as well as datetime, but if it's feasible, it would be great if it could.

If that's not the issue, then my general request is for FCV to support the Smart Date module, however that might happen.

Note: In addition to the discussion below, information related to using Smart Date with FullCalendar View is also in the Smart Date User Guide.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

michaelschutz created an issue. See original summary.

mandclu’s picture

I'm a maintainer of Smart Date and would be happy to assist with this however I can. There are simple methods to convert timestamps to DateTime objects, like DateTime::createFromTimestamp(), since core uses timestamps pretty frequently for storing data like creation and revision dates.

Also, there's an issue on Smart Date to update that module to work with FCV, so if the work really needs to happen over there, any guidance you could provide on the changes needed would be a great help. See #3059978: Integration with FullCalendar View

@michaelschutz Have you tried using FCV with the recent rc1 release of Smart Date? Some of the Views handling was overhauled, so curious if there might be a difference.

mandclu’s picture

As a "quick fix" this got it working for me, by leveraging the existing handling for timestamps and applying it to Smart Date-defined values.

mandclu’s picture

Status: Active » Needs review
michaelschutz’s picture

Thanks @mandclu,

I just tried it out with rc1 of Smart Date and it didn't work, and then applied this patch and still couldn't get it to work. I've just tried it very quickly, though, and will try to dig into it further in the next day or so to make sure it's not me messing it up.

Thanks again.

mandclu’s picture

Can you post a screen grab of your settings for the Fullcalendar display?

mandclu’s picture

There's now an rc2 release for Smart Date. @michaelschutz can you upgrade and retest?

michaelschutz’s picture

@mandclu, thanks for the follow-up. It's now working, but my not getting it to work was my issue, perhaps, not the module's. I just updated it now - it went to rc3.

But it still didn't work. So I created a new View from scratch (I had built the previous one off my current calendar View). In adding the Date fields, I (re)realized that Smart Date exposes 4 choices to Views:

[field_name]
[field_name] - Duration
[field_name] - End
[field_name] - Start

(see attached screenshot - my test field name was "Date (Smart)")

So in all my testing, I had chosen to include Date (Smart) - Start, and Date (Smart) - End. This made perfect sense to me, as Full Calendar View looks for a start and end date/time in the settings.

Instead I chose to just add the Date (Smart) field to the brand-new View, and choose that same field for both the FCV Start and End date fields. Once I did that, it started working. When I went back to the first View I had built for testing and switched out the fields in the FCV settings dialog, it started working.

In theory, though, shouldn't "[field_name] - Start" and "[field_name] - End" also work? If it's by design that they don't, then a note needs to be added somewhere for users to explicitly choose to add the non-appended [field_name] to the View and to use that one field for both the FCV Start and FCV End fields in the View Display settings. It seems counter-intuitive.

Thanks again for your help and work on this module. Now that I know better (and with just a bit more testing to make sure the other needs i have, like All-Day, are met by this, I'll be using Smart Date for all my Date Range needs. :)

mandclu’s picture

Thanks for the feedback. I debated about adding the separate values, because of the potential for confusion. My reasoning was that could be times a site builder wants to list the start and end times separately, for example in a table. I'll add a documentation page about using Smart Date with views, and add a reference to it in the README, and maybe the project page too.

Please set the status to RTBC if you agree that the patch gets Fullcalendar View working with Smart Date : )

mandclu’s picture

michaelschutz’s picture

Thanks for being so amazingly responsive!

I did go on to try it out with a multi-day event set to All-Day in the Smart Date field, but it's only showing the first day on my FCV calendar. So I'm afraid I may not be able to tag it as RTBC yet.

It's showing properly on that date, with no time listed, but it's only being listed on that one day. (e.g. I have it set for July 5-9, 2019 with the All-Day box checked, but it's only showing up on the calendar on July 5.) Is there somewhere I can check a setting for that, in case I'm doing something wrong?

(edit - oh, and just a reply to the thought about separate start/end dates - I agree that's a good feature to have, and many use cases would benefit from that. It's just in this one - maybe because of the way FCV goes about it - it needs only the "main" field that's exposed to the View, not the Start/End ones.)

mandclu’s picture

OK I did some more digging and it turns out the end value needs a slightly different treatment. Please test this updated patch.

michaelschutz’s picture

Thanks again mandclu.

That last patch did fix the display so that the multi-day all-day event now ends on the right day. Thank you!

However (of course! :) ), more issues now crop up with the all-day handling...

I had patched FCV to remove the time display from all-day events according to the patch and instructions from comment #4 in https://www.drupal.org/project/fullcalendar_view/issues/2976922, which was working great with core Date Range fields.

So I noticed that the time was being displayed with Smart Date All-Day fields in the Month view. Not a deal-breaker, but would be great to not display that (or at least have the option). I tried re-applying that patch from the other issue, but that didn't work on Smart Date fields. And, it no longer had an effect on core DateRange fields either. (I should clarify - all of this so far has been in the Month display of FCV.)

So then other issues are seen in the other display modes of the FCV View showing Smart Date fields. In the Week and Day displays, the multi-day all-day event is showing not in the "all-day" box, but filling up all the other time slots. And, in the List display, on the first day of the multi-day all-day event, the time is listed as "12:00-12:00", then "all-day" listed for the middle days, and then on the last day, the time is shown as 12:00-23:59. You can see similar behavior on the Week and Day displays (though the Day display shows 12:00-11:59 every day). I would expect it to be listed as "all-day" each day in the List display, and only show up in the "all-day" box for the Week and Day displays.

I've attached screenshots of the Week, Day, and List displays just for reference.

I'm sorry I can't help on the coding end of things. I hope I've described the issues clearly enough to provide some help, though.

Thanks again for all of your work and help.

mandclu’s picture

Thanks for being so thorough! Not having much experience with Fullcalendar View I wasn't really sure how to test. I believe this new patch should format all day events as expected. You may also want to test how zero duration events get formatted. It seems to format them bigger than I would have expected (for example on the day or week views) but it seems like something native to Fullcalendar.

michaelschutz’s picture

Status: Needs review » Reviewed & tested by the community

Thanks again mandclu - just tested it quickly and it all looks great! No time displayed on the Month display, and the Week, Day, and List displays all have the multi-day all-day event in the proper place with the proper formatting.

I've tagged this as RTBC and maybe @Mingsong is willing to commit this patch from #14?

Date handling in D8 has been a frustration for many. With these two modules, it's solved a lot of my date field headaches, and for my use cases, at least, it's pretty much all I need. The icing on the cake would be full repeat support with exceptions, editable instances, etc. But I know that's a lot to ask. FCV has an implementation of recurring events which is interesting, but doesn't quite fit my use cases. If you're feeling ambitious, mandclu, I think Smart Date would be *the* go-to module for date range fields if it could handle the full suite of repeat scenarios. :)

Thanks again for all your work helping out on a module that isn't even yours for a guy who can't contribute code beyond copy-and-paste.

mandclu’s picture

To be honest, my preference would be to leverage the recurring date functionality already built into FCV, but then it wouldn't carry over to non-FCV views. There's also an issue open for recurring dates at #3058279: Recurring Dates, so please share any thoughts you have over there.

mparker17’s picture

I can confirm the patch in #14 works if you add the Smart Date views field itself (i.e.: not the views field variants that end with - Duration, - End, or - Start) and select it as the "Start Date Field" in the Full Calendar Display style settings.

Seeing that the Full Calendar Display style settings had "Start Date Field" and "End Date Field" options, I had originally added the - Start and - End variants and tried to select those in the Full Calendar Display style settings, which didn't work.

jdearie’s picture

I originally used Fullcalendar_View without Smart Date, but found the core date options limiting.

After @timwood told me about Smart Date, I installed it and replaced my date fields in my event content type with a single Smart Date field.
Installed the patch above, updated my calendar view to point to the SmartDate field for both start and end dates, and everything worked great!

No hidden steps. Installed Smart Date, used the patch in #14, updated my view to point to the SmartDate fields, and voila - it worked!

Thanks much!!!

abenguyen’s picture

Can confirm comment #17, adding the field variants " - Start" & " - End" does not work with the calendar.

laura.gates’s picture

It appears that this patch is also unable to handle smart date fields that allow more than one date per node. In D7 views with the date module, all you had to do is make sure that query settings were set to distinct -> pure distinct and deselect the Display all values in the same row checkbox for multiple field settings within the date field for views.

Edit: Looks like @ericclarkwa is working on this issue: https://www.drupal.org/project/fullcalendar_view/issues/3069076

mandclu’s picture

Status: Reviewed & tested by the community » Needs review
FileSize
2.82 KB
2.89 KB

I updated the patch to allow for properly displaying multiple values. Please test and let me know if this works as expected.

It should only be necessary to deselect "show multiple results in the same row" to get them to display properly.

laura.gates’s picture

Thanks @mandclu! The patch works perfectly.

mandclu’s picture

Status: Needs review » Reviewed & tested by the community
mistify’s picture

@laura.gates how are you getting both the start and end time to show in the calendar view as seen in the second screenshot you posted?

laura.gates’s picture

@mistify, I made several custom smart date formats for my site. You can do the same by going to: /admin/config/regional/smart-date

jshimota01’s picture

on re-read this is really multiple problems I'm experiencing - when Smartdates is used I see no data on calendar, Tax Tag colors, seeing the Select Language and other difficulties. Also, this is my first D8, I've used d6&d7 for many years and thought this project would be good to get my feet wet and d8 might be stabilizing.
Initially I used date range field and FCV - latest prod versions as of 10/31/2019. I could get my calendar populated and I thought all was well. But the Tax Tags would not reflect the color settings assigned. While trying to test and understand what I could be doing wrong, I saw the references here to SmartDates module and wanted to implement instead for the format benefits. I LEFT the date range field, and added a new Smartdate field. I populated and changed the FCV view settings to reflect the different choice. The calendar still looked good except for the original colorization problem.
Then I got distracted with the help dates being formatted wrong. Being here in the USA I assume the world revolves around us :). Drupal8 has changed to ISO 8601 standard and that was a different problem I worked on - (see Authoring information help text for an example).

I then removed the unused Date Range field from my content type for cleanliness - and the calendar lost all data even tho there was no FVC reference in the settings. Switching to Unformatted format, the data for my smart date was there. (I continually flush cache btw.)

Since then, I have been trying a myriad of efforts and started to see the Select Language box problem described elsewhere. The preview in the view editor deceives as this doesn't occur when the view is accessed as a page.

For my description field, I customized and used tokens. And couldn't understand what I was doing wrong, until I learned that many or most of the field customizations are ignored - I was trying to wrap the field with Custom CSS class for example, and that didn't pass forward from FCV either.

Regarding the Tax Tags not showing color, I feel it has to do with relationships. Although it shows in my content, no amount of playing could get it to work.
My SQL structure - I have tax tags in a vocabulary name. That is used by an tournament type content. I have a venue content type. The event is connected to the venue AND the tournament type.
During testing - if the tags are a field directly connected to the calendar, the colorization of tags works. If the tags come through a relationship, they show correctly in the pick list of FCV, but do not show on the calendar, only the content type colorization has effect.

Regarding Smartdate - is it possible there is interaction between smartdate and date and/or daterange? Is there a recommendation of which modules ONLY that are necessary to implement FCV and smart date?

I am sorry this is poorly explained and isn't very supportive or technical - I guess I'm trying to report 'having issues with Smartdate and FCV'. Because I've been trying so many things, I've lost control of details that might be more helpful.

For now, I'm removing Smartdate, and implementing Date, daterange, and time field types - and accepting that I can't use Tags for colorization at this time - I'll force CSS to handle it manually - I've spent 2 full days trying my best, but my skills are just not good enough to push through on this.

mandclu’s picture

@jshimota01 I've used Smart Date and FCV with no other modules, and had it work with the core Datetime Range enabled as well.

It sounds like you've seen the issue with taxonomy-based colouring with or without Smart Date, so I'm inclined to suggest that isn't specific to Smart Date integration, and as such should be a separate issue.

Regarding the configuration for Smart Date, here are some screen shots to clarify the proper steps:

As mentioned earlier in this thread, Smart Date give you the option to add parts of the time range as separate fields, but the integration currently only works if you use the full field, which should be the first option (as shown above).

Then, in the settings for the FullCalendar display, make sure you have it configured to use this field for both the start and end dates:

After you removed the datetime range field, did you update display as above?

wendymc’s picture

Has this patch been rolled into an official release? We are on 8.x.2.4 and I don't see it in there. I also attempted to add the patch to this version and it's not working for me.

Thank you!

jshimota01’s picture

Thank you Mandclu for your post #27 (and all you do).
in response to your question and suggested verification, I double checked this and have correctly selected SmartDate full field. I DID initially stumble over that little crumb once as well early in my efforts but did see the comments and dialog as this got sorted out previously.
Re: the issue with taxonomy-based colouring with or without Smart Date - I will check deeper for any other outstanding issues to see if it already is outstanding or noted elsewhere.
At this time- I'm working well with the exception of the color problem. I'm looking at a kludge to do this in CSS or to assign Tax Tags directly to the record and bypass the join. Thank you Sir!
Jim S.

Dave Kopecek’s picture

RE #28 I just applied 3061341-21 against a2fb73f using composer without issue.

mandclu’s picture

Issue summary: View changes

@jshimota01 Thanks, glad to help. If you create a new issue for the taxonomy colouring, feel free to tag it here as a related issue. If you have a sense of what needs to change from a markup perspective that would help.

Also, updating the summary to include a link to the Smart Date User Guide page which now contains some of the information from this thread. If anyone has additional items they think should be covered there, or suggestions on how to make it clearer, I'm open to suggestions (or edits).

@wendymc This hasn't yet been committed, and not yet in a full release. I'm sorry to hear this functionality isn't working for you. Can you confirm that you followed the steps described on the documentation page mentioned above? Can you provide some detail on what isn't working?

extect’s picture

Works great! Can we get this committed to Fullcalender View?

Mingsong’s picture

Thanks guys for all your works.

The 3.x version introduces a new plugin type 'FullcalendarViewProcessor' that provides the capability to alter the view preprocess working with other modules.

Here is an example of a plugin:

https://git.drupalcode.org/project/fullcalendar_view/blob/234a4be26c268b...

What I suggest is to define a plugin as a bridge working with Smart Date module.

mandclu’s picture

Thanks @Mingsong happy to give that a try.

One thing to clarify first: The previous logic that was patched here appears to have been moved to FullcalendarViewPreprocess.php. Will the plugins manipulate the data before it's processed there?

Mingsong’s picture

The logic for working with Smart Date module hasn't been implemented within a plugin.

So we need someone to develop a plugin as a bridge module for Fullcalendar View module and Smart Date module.

The version 3.x of Fullcalendar View module just provides a plugin type that allow other modules to embed their own logic as a plugin to the view preprocess.

mandclu’s picture

I understand that and I'm perfectly willing to help write the plugin.

Here is my concern: the logic the we patched for the 2.x branch is in a class called a PREprocessor, and will not process the values properly if they are not of a known type. The plugins are called processor plugins, which would seem to indicate that they are called after the work of the preprocessor. It will be useless to write a plugin that attempts to alter the value of a field that has already been rejected as invalid. So I want to confirm that before I put the effort into writing a plugin, that the order of operations for the code will make this effort worthwhile.

One other thing to confirm: I assume that the whole purpose for this new plugin-based approach is that the plugin written to support Smart Date values doesn't need to be in the Fullcalendar View module, and instead can be part of the Smart Date code. Is that correct?

Mingsong’s picture

Regarding the question 1, Yes, confirmed.
The plugin will be called inside of the template_preprocess_views_view_fullcalendar function where the logic is embedded in 8.x-2.x.
So as long as the patch is working fine with 8.x-2.x branch, it should be no problem for embedding the logic into a plugin with 8.x-3.x.

Details where the plugin is called:
https://git.drupalcode.org/project/fullcalendar_view/blob/318f4ba08ed038...

Sorry for my poor English. I hope I explain that well.

About the question 2, Yes, you are perfectly right.

Mingsong’s picture

Here is the source codes for the plugin


/**
 * Smart Date plugin.
 *
 * @FullcalendarViewProcessor(
 *   id = "fullcalendar_view_smart_date",
 *   label = @Translation("Smart date processor")
 * )
 */
class SmartDateProcessor extends FullcalendarViewProcessorBase {

  public function process(array &$variables) {

    $moduleHandler = \Drupal::service('module_handler');
    if ($moduleHandler->moduleExists('smart_date')){
      $view = $variables['view'];
      $fields = $view->field;
      $style = $view->style_plugin;
      $options = $style->options;
      $start_field = $options['start'];
      // Field machine name of end date.
      $end_field = $options['end'];
      $start_field_option = $fields[$start_field]->options;
      $end_field_option = empty($end_field) ? NULL : $fields[$end_field]->options;
     
      if (strpos($start_field_option['type'], 'smartdate') === 0 
        && strpos($end_field_option['type'], 'smartdate') === 0) {
        $entries = isset($variables['#attached']['drupalSettings']['fullCalendarView']) ? $variables['#attached']['drupalSettings']['fullCalendarView'] : [];
        
        // Go through all results of the view.
        foreach ($view->result as $row) {
        // Result entity of current row.
        $current_entity = $row->_entity;
        // Calendar event start date.
        $start_date = $current_entity->get($start_field)->getValue();
        // Calendar event end date.
        $end_date = empty($end_field) || !$current_entity->hasField($end_field) ? '' : $current_entity->get($end_field)->getValue();

        if (!empty($start_date)) {
          // Recurring range.
          $range = NULL;

          // Start field is vital, if it doesn't exist then ignore this entity.
          if (!$current_entity->hasField($start_field)) {
            continue;
          }

          // There might be more than one value for a field, so use only one.
          $type = $row->_entity->getEntityTypeId();
          $delta_key = $type . '__' . $start_field . '_delta';
          if (property_exists($row, $delta_key)) {
            // Use the delta to retrieve the proper value.
            $delta = $row->$delta_key;
            $start_date = $start_date[$delta]['value'];
          }
          else {
            // Default to the first value.
            $start_date = reset($start_date)['value'];
            $delta = FALSE;
          }

          
            // Process start and end right away, since a Smart Date will always
            // include both values.
            $start_date = intval($start_date);
            if ($delta === FALSE) {
              $end_date = reset($end_date)['end_value'];
            }
            else {
              $end_date = $end_date[$delta]['end_value'];
            }
            $end_date = intval($end_date);

            // Check for how Smart Date stores all day events
            // and format appropriately.
            if (date('Hi', $start_date) == "0000" && date('Hi', $end_date) == "2359") {
              $start_date = date('Y-m-d', $start_date);
              $end_date = date('Y-m-d', $end_date);
            }
            else {
              $start_date = date(DATE_ATOM, $start_date);
              $end_date = date(DATE_ATOM, $end_date);
            }

             if (!isset($default_date) && $options['default_date_source'] === 'first') {
               // Only use the first 10 digits since we only care about the date.
               $default_date = substr($start_date, 0, 10);
             }

             $all_day = (strlen($start_date) < 11) ? TRUE : FALSE;

             // Update the date to current row.
            foreach ($entries as &$entry) {
              if ($entry['id'] === $current_entity->id()) {
                if ($all_day) {
                  $end = new DrupalDateTime($end_date);
                  // The end date is inclusive for a all day event,
                  // which is not what we want. So we need one day offset.
                  $end->modify('+1 day');
                  if (!empty($entry['dow']) || !empty($entry['dow'])) {
                    $entry['ranges']['start'] = $start_date;
                    $entry['ranges']['end'] = $end->format('Y-m-d');
                  }
                   else {
                    $entry['start'] = $start_date;
                    $entry['end'] = $end->format('Y-m-d');
                   }
                }
                else {
                  // Recurring event.
                  if (!empty($entry['dow']) || !empty($entry['dow'])) {
                    $format = 'H:i';
                    $entry['ranges']['start'] = $timezone_service->utcToLocal($start_date, $timezone, 'Y-m-d');
                    $entry['ranges']['end'] = $timezone_service->utcToLocal($end_date, $timezone, 'Y-m-d', '+1 day');
                  }
                  else {
                    $format = DATE_ATOM;
                  }
                  // By default, Drupal store date time in UTC timezone.
                  // So we need to convert it into user timezone.
                  $entry['start'] = $timezone_service->utcToLocal($start_date, $timezone, $format);
                  $entry['end'] = $timezone_service->utcToLocal($end_date, $timezone, $format);
                }
                break;
              }
            }
          }

        }
        
        // Update the entrys.
        if ($entries) {
          $variables['#attached']['drupalSettings']['fullCalendarView'] = $entries;
        }
        

      }    
    }
  }
}

mandclu’s picture

Awesome, thanks for writing this! I've created Smart Date issue #3101524: Provide FullcalendarViewProcessor plugin to support Fullcalendar View to get this into the next release.

jlashomb’s picture

Figured I give the 3.x-dev branch a shot with the patch from #39, but it doesn't seem to be working. It appears that entries are never populated before getting to the new plugin. Looking at the fullcalendar_view/src/FullcalendarViewPreprocess.php it seems that entries that aren't using timestamp, datetime, or daterange field types get skipped and never end up in the entries array (line 287: This field is not a valid date time field).

Originally I was trying to build events with a single date field and two time fields, then rewrite the time fields to include the date. I'm thinking that this is also the issue that was breaking that approach, and the "Use entity fields" option wasn't helping either.

jshimota01’s picture

Regarding Smart Date with the 2.5 released 1/7/20 - just reporting in for others- I wasn't paying attention and ran composer upgrade. FCV updated and my calendar broke. I had previously patched FCV 2.4 via Git (i think :) ) with fullcalendar_view-smart_date-support-3061341-21.patch and been happily tooling along.

I modified my composer json, added the patch to the patches section as such:

"drupal/fullcalendar_view": {
"Mod to FCV for smart date support": "https://www.drupal.org/files/issues/2019-10-19/fullcalendar_view-smart_d..."
}

However, after clearing cache no content in my calendar! scratched my head a bit, and reviewed the gui settings in my view.

Under :
Display
Calendar display settings.
I UNCHECKED
"Use entity fields"
Use entity fields for rendering rather than the raw view fields. This is checked by default to prevent legacy views from breaking. However, it will prevent using views rewriting and does not support non-standard date fields (fields other than timestamp, datetime and daterange).

My data came back and I'm really happy since I can now use rewriting (Assumedly, I haven't actually tried it yet).
Thanks to all, for all the effort I'm taking advantage of!

stefan.korn’s picture

@MingSong: Can you give some explanation about what @jlashomb in telling us in #40?

I think @jlashomb is right that the plugin cannot work with field types other than timestamp, datetime or daterange because of this:
https://git.drupalcode.org/project/fullcalendar_view/blob/d458b7210fe75f...

made a proposal about that in #3110553: Allow FullcalendarViewProcessor plugins to define supported field types

Mingsong’s picture

Hi Stefan,

Thanks for the proposal which has been pushed to 8.x-3.x.

jasonawant’s picture

Version: 8.x-2.2 » 8.x-2.6

I'm a little confused about this issue's status and version.

I've applied the patch in comment #21 against the 2.6 version successfully. I'm not sure if applies cleanly to the 2.x version.

The latest comments seem to be about FCV 3.x version. For the 3.x FCV version and Smart Date compatibility, I think that work can be found in #3110553: Allow FullcalendarViewProcessor plugins to define supported field types and #3101524: Provide FullcalendarViewProcessor plugin to support Fullcalendar View.

Regarding the Smart Date and FCV documentation page, https://www.drupal.org/docs/8/modules/smart-date/smart-date-and-views-in..., should it reference the patch in #21 above or using FCV 3.x version and updated Smart Date with work from #3101524: Provide FullcalendarViewProcessor plugin to support Fullcalendar View?

mandclu’s picture

@jasonawant you are correct that the documentation hasn't been updated to reflect working with the FCV 8.x-3.x-dev. That said, the recently released FCV 8.x-4.0 has made some additional changes, which has broken some of the integration between Smart Date and FCV. You can follow #3130949: SmartDateProcessor doesn't work with fullcalendar_view 8.x-4.0 and its related issues to get a sense of the progress, but also feel free to update with any feedback from your own testing.

If you need something that will work right away, I would suggest using FCV 8.x-2.6 with the patch above until everything has been worked out for the integration with 8.x-4.0.

Also, the intent is that eventually the Smart Date Starter Kit will have a companion module for a calendar view, so you'll be able to have a one-click install that sets everything up for you. Again, once everything is working with FCV 8.x-4.0.

mandclu’s picture

Further to the most recent comments, there is now an 8.x-2.4 release of Smart Date, to be compatible with Fullcalendar View 8.x-4.0.

There is also now a Smart Date Calendar Kit to get you quickly up and running using Smart Date with Fullcalendar View. Simply run composer require drupal/smart_date_calendar_kit and then drush en smart_date_calendar_kit. That will install the modules and create an Event content type, including tabbed views (interactive calendar, upcoming, and past).

kkaya’s picture

For Fullcalendar View version 8.x-4.3 and later, smart dates aren't displaying for me again. If I stay with Fullcalendar View version 8.x-4.2 and Smart Date 8.x-2.5, then date display works. Using later versions of Smart Date (8.x-2.6 or 8.x-2.7) with Fullcalendar View version 8.x-4.2 also isn't working for me. Are others seeing this issue?

mandclu’s picture

Unfortunately this got more complicated and harder to communicate because FCV changed the internal data structure in a minor version, instead or creating a new major version.

Use Smart Date <= 8.x-2.5 for FCV versions 8.x-4.2 or below

Use Smart Date >= 8.x-2.6 for FCV versions 8.x-4.3 or above

I think there may be a way to make an updated version of Smart Date that can support either structure, but I haven't had a chance to work on it yet. Getting out a fix to get it working again was the priority.

mandclu’s picture

I created #3145989: Make Smart Date support old and new versions of Fullcalendar View as a Smart Date issue to try and support both data structures for the FullcalendarViewProcessor. I'll try to get a patch up shortly, so feedback there would be appreciated.

jshimota01’s picture

I also see the same thing KKAya #47 reported. and sheepishly, I didn't document my findings. I saw that it was FCV,
In https://www.drupal.org/project/fullcalendar_view/issues/3143986 I communicated with FCV that I I thought I had identified a problem and the response at that time from the maintainer was
'High coupling between contributed modules is not good design.
For this reason, This issue won’t be fixed. So I close this ticket." and I got a bit shocked and stepped back to rethink my use of these 2 modules. I completely appreciate BOTH FCV and Smart date maintainers - they do a yeoman effort on what I feel are 2 critical modules that both will someday become core (IMHO).
Things are getting messy in the D8 world as the prepaartion for D9, the requirement of composer for core installs and other factors (php 7.3!) make it less likely I can spend quality time helping / testing as a dumb user - but I promise to try!
Mandclu - I stand with you!

kkaya’s picture

@jshimota01 - my issue in #47 turned out to be unrelated to Smart Date. @mandclu kindly pointed me in the right direction and opened a ticket (https://www.drupal.org/project/fullcalendar_view/issues/3146001) that was resolved by the FCV developer in the current version.

kkaya’s picture

@jshimota01 - my issue in #47 turned out to be unrelated to Smart Date. @mandclu kindly pointed me in the right direction and opened a ticket (https://www.drupal.org/project/fullcalendar_view/issues/3146001) that was resolved by the FCV developer in the current version.

Ankit Agrawal’s picture

Smart Date module integration worked for me with the integration of #21 patch. Tried with Smart Date module version 8.x-2.8 and Full Calendar views module version 8.x-2.6.

Thanks

matt_paz’s picture

I'm curious about the latest on this front.
I've been successful getting the fullcalendar_view's 5 branches to work core date, but not smart_date.

I've been trying to test with several different versions.

Most recently I was trying to test with:

* fullcalendar_view (dev-5.x 31ca6850)
* smart_date (3.2.0)

But I was unable to get it to work on any of the more recent releases of either.

Any guidance on whether or not the combination of the two is expected to work together?

mandclu’s picture

@matt_paz Fullcalendar View and Smart Date should work together pretty reliably at this point.

You could try installing the Smart Date Calendar Kit module on a clean install of Drupal to see how it's configured.

matt_paz’s picture

@mandclu

Thanks. I tracked it down.
I'd forgotten that I had another patch applied for fullcalendar_view.

I've updated the issue for it here:
https://www.drupal.org/project/fullcalendar_view/issues/2976922#comment-...

One I removed that, everything seemed to work swimmingly.

Thanks again!
Matt

mandclu’s picture

@matt_paz thanks for the update. Maybe you've realized this already, but Smart Date has its own support for all day events, and its integration with Fullcalendar View should allow all day events to be shown appropriately in the calendar

bill_redman’s picture

I recently learned of Smart Date (3.5.1) and decided to try it out with Full Calendar View. I am using FCV 8.x-2.8 and saw the note in the documentation about applying the patch if one was using an 8.x-2.x version to get the Smart Date values to show. However, it didn't say what patch. I went to this issue and saw that there were a number of patches. So far I have applied the patches in #3 and #12 and my Smart Date recurring event shows but fails to show as recurring. All the events are showing on the first date the event takes place. I am on Drupal 9.4.5. Any suggestions?

Mingsong’s picture

Status: Reviewed & tested by the community » Closed (outdated)