Skip to content

steinwinde/calendar

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

calendar: A LWC calendar with a look and feel similar to Salesforce's Calendar

Intro

This LWC provides many of the features of Salesforce's calendar. Javascript and HTML can be redacted to meet specific requirements. In several respects, it is already now more versatile than Salesforce's Calendar. Examples:

  • can be inserted anywhere, e.g. in a sidebar of a record page, or in a Community page
  • can render events (e.g. of a day) in any order, e.g. based on priority or an itinerary
  • can render icons inside selective events (e.g. a status "done")
  • provides multi-select and multi-drag-drop behaviour, e.g. to facilitate simultaneous updates of events
  • can be configured to provide Salesforce's Scheduler calendar (see e.g. here)

On the Roadmap

  • Better rendering on mobile devices
  • Configuration in order to display an hour or minutes scale for day view (like it already exists for week view)
  • JSON configuration instead of list of attributes to enable conditional properties like "if mobile, show scheduler, else normal view"
  • Removal of specific week days from view (e.g. remove Saturday and Sunday)
  • Background events e.g. to indicate holidays that stretch across several days
  • A second mini-calendar for independent date choices and quick navigation
  • Explicit support of being inserted in the sidebar
  • Event types that behave (e.g. read-only vs. read-write) differently from each other
  • Wrapper that allows the selection of an SObject as input like Salesforce's calendar
  • Visual indication for today's date
  • Tooltips
  • Other Salesforce calendars could be emulated

Known Issues

Project Structure

The force-app directory comprises the top level calendar component (LWC calendar) with its child components.

The force-demo-app demonstrates the use of the (afore) calendar. It exposes the calendar @api variables as settings that the user can configure, and it populates the calendar with example data based on a Javascript file. (In order to understand supported configurations, it's worth reading the eventCalendar.js-meta.xml .)

Examples

Without modifications, the example force-demo-app shows this screen. calendar-before-modifications

The respective year view looks like this. calendar-before-modifications-year-view

After ticking the box "Render as Scheduler" and "Stacking for order and size of week items" in the Lightning App builder, the week view looks like this. calendar-with-scheduler-configuration

Comments welcome.

About

LWC calendar

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published