Calendar plugin schedule button not showing despite adding document type

17 replies
Last updated: Jan 28, 2022
Hello Sanity people, do you have any experience with the https://www.sanity.io/blog/calendar-plugin ? I can’t make it work, the schedule button does not show even though I’ve added my document in the content-calendar.json:

{
  "types": [
    {
      "type": "homePage",
      "field": "publishedAt"
    }
  ]
}
Does anyone know what could be wrong here?
🤔
homePage
is the name of my custom document
AI Update

I need to give you some important news: the Content Calendar plugin you're trying to use is officially deprecated and archived. The GitHub repository was archived on April 12, 2023, and the README explicitly states: "NOTE: This plugin is deprecated. Use Sanity Scheduled Publishing instead."

This means the plugin is no longer maintained or supported, which is why you're having issues getting it to work. Even if you troubleshoot the configuration, the plugin isn't compatible with modern Sanity Studio versions and has been intentionally discontinued by the Sanity team.

Here's what you should use instead:

Sanity now has native scheduling capabilities built directly into the platform. There are two main options depending on your needs:

  1. Built-in Scheduled Publishing - For scheduling individual documents, Sanity has native scheduling features that work directly in the Studio without needing external plugins. This is the direct replacement for the old calendar plugin.

  2. Content Releases - If you need more advanced capabilities like bundling multiple document changes together, Content Releases is Sanity's modern solution (available on Growth plans and above). It lets you:

    • Stack and stage content updates across multiple documents
    • Schedule releases for automatic publishing at specified times
    • Preview and validate everything before it goes live
    • Coordinate complex content launches without manual tracking

Why the old plugin doesn't work:

The calendar plugin was built for Studio v2 and hasn't been updated for Studio v3's architecture changes. The repository is archived, meaning no updates or bug fixes will ever come. The Sanity team deprecated it specifically because the native scheduling features are more reliable, better integrated, and actively maintained.

Next steps:

  1. Remove the old content-calendar plugin from your project entirely
  2. Delete the content-calendar.json configuration file
  3. Check the current Sanity documentation for the built-in scheduled publishing feature that matches your Studio version
  4. If you need bundled release workflows, evaluate whether Content Releases fits your needs

Sorry you hit a dead-end with the archived plugin, but the modern native alternatives are genuinely better and will save you future headaches! The plugin being deprecated is actually why it's not working, not a configuration issue on your end.

Show original thread
17 replies
I haven’t personally had the opportunity to use this plugin from scratch yet - so great learning opportunity for me, and I’m wondering if there are some assumptions in the referenced document schemas that aren’t clearly defined. My custom document type name in my case is just
article
. I have tried to display off of both a basic date type field named
publishedAt
and the default
_createdAt
field id with no luck yet, though I have only just spent a few minutes with it. If this detail is in the documentation, I glazed right over it too!
here is my content-calendar config on first pass (this is NOT working yet for me either)

{
  "types": [
    {
      "type": "article",
      "field": "publishedAt",
      "titleField": "title"
    }
  ],
  "calendar": {
    "event": {
      "dateFormat": "MMMM, dd yyyy",
      "timeFormat": "hh:mm a",
      "showAuthor": "false"
    }
  },
  "filterWarnings": [{}]
}
And here is the first bit of my example
article
document:
export default {
  name: 'article',
  title: 'Article',
  type: 'document',
  icon: GiBeech,
  fields: [
    {
      name: 'title',
      title: 'Title',
      type: 'string',
    },
    {
      name: 'slug',
      title: 'Slug',
      type: 'slug',
      options: {
        source: 'title',
        maxLength: 96
      }
    },
    {
      name: 'publishedAt',
      title: 'Published Date',
      type: 'date'
    }, //...
I think I have this running in a different community example schema. I’ll dig into that next to compare.
the git documentation is here if you haven’t seen it yet: https://github.com/sanity-io/sanity-plugin-content-calendar
okay, I got it to work in my barebones from scratch build - now let’s see if we can get yours going.I think this is the end result you’re looking for:
here is my studio document:
(I am currently in NA Pacific time)
./config/content-calendar.json

{
  "types": [
    {
      "type": "article",
      "field": "publishedAt",
      "titleField": "title"
    }
  ],
  "calendar": {
    "event": {
      "dateFormat": "MMMM, dd yyyy",
      "timeFormat": "hh:mm a",
      "showAuthor": "false"
    }
  },
  "filterWarnings": [{}]
}
my article document schema:

export default {
  name: 'article',
  title: 'Article',
  type: 'document',
    fields: [
    {
      name: 'title',
      title: 'Title',
      type: 'string',
    },
    {
      // TODO: import slugify fn -- do I want this to be legible?
      name: 'slug',
      title: 'Slug',
      type: 'slug',
      options: {
        source: 'title',
        maxLength: 96
      }
    },
    {
      name: 'publishedAt',     /* <<< the important bit */
      title: 'Published at',
      type: 'datetime'
    },
// continued...
I’m not sure if it’s buggy or if there is something that I can proactively do to get these to display. But existing documents aren’t displaying for me in the behind-the-scenes query that the plugin does. I had to create a new document and set publishedAt type
datetime
to get it to display.
Let’s see if you can get to where I am and work from there.
actually, any new documents set to a passed published date aren’t appearing either - I’ll tinker with it some more to see if I can get this to work
actually, any new documents set to a passed published date aren’t appearing either - I’ll tinker with it some more to see if I can get this to work
please let us know if you can see the schedule updates in your document publish button with my example
I’ve asked our app support team if I’m missing a flag to display past-published documents in this case, as it appears the example shows that this is expected.
Omg thank you for all this work, I'll check it first thing tomorrow, I'll keep you updated, you're the best 👏
still tinkering some, now that my example future-published article is in the past, it continues to display in the calendar. I’ll try to update if I get any more feedback.
I think that’s normal tho, I belive you need some backend cronjob

Performing the publish event, in the future
This plugin does not perform the publishing of documents on its own, as it is just a Studio plugin running in an editors' browser. In order to actually perform the scheduled publishing, a script needs to run either periodically, or at the given publishing times to perform the publish action.

We advise setting up a cronjob running for instance every minute that checks if any document should be published and then perform that action. A full script that does this is represented below.

When the publish event eventually occurs, any newer draft will be discarded. This is why the plugin warns you if you make further changes to a document after you schedule it. If you don't want to lose the newer changes an editor will need to Reschedule them. The plugin will prompt for this with a warning in the calendar view and an updated document action.
ah right, I haven’t gone that far in my tests yet. I’ll try building this into my next project!
awesome you rock 🙌
Ok things are way more clear now, I didn’t know I had to set a date later on the
PublishedAt
field. When I change this to a later date, I see the
schedule
button finally! So it seems like it’s all working well after all 😊Thanks a lot for your help Julia

Sanity – Build the way you think, not the way your CMS thinks

Sanity is the developer-first content operating system that gives you complete control. Schema-as-code, GROQ queries, and real-time APIs mean no more workarounds or waiting for deployments. Free to start, scale as you grow.

Was this answer helpful?