Intro
The single planning calendar is a scheduling component that displays the calendar of a single person or resource over a day, work week, or week. Users can view appointments, create new appointments, and delete appointments.
Single planning calendar
When to Use
Use the single planning calendar to:
- Enable users to schedule or monitor the calendar of a single person or resource.
- Offer multiple calendar views (day, work week, week, month).
- Compare objects of the same type over a given period (for example, appointments for multiple people or resources). In this case, use the planning calendar.
- Schedule mainly all-day appointments when you don't need an hour axis. In this case, use the planning calendar.
- Display complex graphical representations, or build planning applications involving activities, resources, hierarchical project structures, relationships, and so on. In this case, use the Gantt chart.
Anatomy
The single planning calendar consists of the following components:
Single planning calendar anatomy
1. Header: Contains the toolbar and the navigation.
2. Toolbar: Consists of the calendar title (optional) and the toolbar actions (app-specific actions, view switch, and legend).
3. Navigation: Contains back and forward arrows, the Today button, a date interval link, and the date strip.
4. Date strip: The horizontal axis of the calendar grid, showing the currently visible day or days. Non-working days are a darker color.
5. Timeline: The vertical axis of the calendar grid, showing the hours.
6. Calendar grid: The calendar contains the appointments and all-day appointments, and is controlled by the selected view. Non-working days have a darker background color in the calendar grid.
7. "Now" marker: The "now" marker is a horizontal line through the calendar grid, which indicates the current time. The current time is visible on the timeline. If the current time falls within 15 minutes of a full hour, it replaces the full hour.
Components
Toolbar
The calendar toolbar is based on the responsive overflow toolbar. All elements are optional, and you need to add them explicitly. The view switch can be a segmented button (four views or less) or a select component (five views or more).
A: Title
B: App-Specific Actions
C: Legend
D: View-Switch
Toolbar structure
Legend
To show the types for days and appointments, the planning calendar uses a specific legend control (sap.m.PlanningCalendarLegend).
Users open the planning calendar legend using a standard legend button in the toolbar ( :icon-legend ). Like all other toolbar actions, you must add the legend button explicitly.
The planning calendar legend has two non-collapsible sections containing legend elements. By default, these are called Calendar and Appointments, but you can change the titles. If no elements are available for a section, it isn't displayed.
A. Popover Title: You decide which container to use. We recommend a popover to keep the context, but a dialog or dynamic side content are also valid options.
B. Calendar Section: Contains four standard legend items: Today, Selected, Working Day and Non-Working Day. You can switch off unused items via the standardItems property. Add the Selected element to the legend when the calendar is in 1 Month mode on smartphones. The component doesn't do this automatically.
C. Special Days: You can define special days that get a highlight in the date strip. You must manually add the special day colors to the legend; they aren't added automatically.
D. Appointments Section: The Appointments section contains the color values for the available appointment types. You must explicitly define which color represents which type.
Legend in popover
View Switch
The view switch allows users to switch between different time intervals. The default views are Day, Work Week, Week, and Month. You can choose which views to include, depending on the use case.
Depending on the number of available calendar views, the view switch can be a segmented button (four views or less) or a select component (five views or more). The select component comes with a visible label to fulfill accessibility requirements.
Month View
In month view, all appointments for each day have the same width and height. Each grid cell can hold up to 4 appointments in compact mode and 3 in cozy mode. Users can access remaining appointments with a # More link (for example, 2 More). In month view, all-day appointments look and behave like regular appointments.
Custom View
You can also create custom views by setting a different number of visible columns in the grid. We recommend doing this only if your use case really requires it. You must also ensure that any custom views are responsive. For anything over 7 days, provide an alternative view for size S.
Custom view with 10 days in size L
Custom view with 3 days in size S and cozy mode
Appointments
Each appointment can have an icon or image, a title, and a subtitle. If there isn't enough horizontal space for the text, it's truncated. If an appointment has an icon, the icon remains visible as long as there's space for it, even if that doesn't leave enough space for the title. If there isn't enough vertical space, the subtitle isn't shown. The subtitle isn't shown in the month view.
You can set up to 20 appointment types. Each type has its assigned color. Always choose appointment types with contrasting colors. Make sure each type is also represented as text, not only by color.
A: Color indicator
B: Icon or image
C: Title
D: Description
Appointment structure
Timed Appointments
B: Tentative appointments: Setting an appointment to tentative turns the outline into a dotted stroke.
Timed appointments
All-Day Appointments
All-day appointments span 24 hours. They appear in a dedicated area below the date strip and above the first hour of the timeline.
There's no height limit for the all-day appointments area. However, if your use case involves a lot of all-day appointments and their area takes up most of the screen, consider using the planning calendar instead.
All-day appointments that span multiple days display chevron arrows to indicate their range. A right arrow signals that the appointment continues into the following day or days. A left arrow signals that it started on a previous day.
All-day appointments
Behavior and Interaction
Calendar Navigation
The date interval link in the navigation shows the visible period. Clicking the link opens a date picker, which helps users navigate quickly to a specific day or week. Clicking the Today button takes users to the period containing the current day.
First Day Of The Week
You can set the day that displays as the first day of the week in the week and month views. Valid values are 0 to 6, starting with Sunday. If no value is set, the locale default is used.
Working Hours
You can set working hours in the single planning calendar (properties: startHour, endHour). Non-working hours then have a different background and can be hidden (property: fullDay). You can also give users the option to toggle between working and non-working hours. We recommend adding a toggle button to the toolbar (you must add it explicitly).
Sticky Header
To keep the context when users scroll down the calendar, you can keep the header area fixed at the top of the screen (property: stickyMode).
At app level, you can make the entire header area sticky (value: All) or only the navigation area (value: NavBarAndColHeaders).
Creating an Appointment
A: Sample dialog for creating timed appointments
B: Sample dialog for creating all-day appointments
Sample dialogs for creating an appointment
Creating Timed Appointments
We recommend offering a Create action in the toolbar. You must implement the UI for creating the appointment at app level. The component provides only the underlying functionality for creating appointments. For most use cases, we recommend a dialog (see the sample dialog below).
Creating All-Day Appointments
You must add the option to create all-day appointments at app level. Consider using a switch or checkbox that automatically sets the appointment start and end time to 00:00. We also recommend reflecting this in the appointment creation UI. For example, offer a date picker instead of a date/time picker for selecting the start and end of the appointment (as shown in the sample dialog).
Viewing Appointment Details
You must implement the UI for viewing appointment details at app level. The component provides only the underlying functionality for displaying appointment details. We recommend using a popover to keep the context for users (see the sample popover below).
Sample popover for viewing appointment details
Zooming
To make appointments easier to read, you can implement the zoom behavior using a button, step input, or slider.
The scaleFactor property controls the zoom level. It accepts values from 1 to 6. The number represents a multiplier for the height of the rows.
Drag and Drop
You can enable drag and drop for moving appointments (property: enableAppointmentDragAndDrop). Moving an appointment changes its start and end times (for example, if an appointment is scheduled from 1:00–2:00 PM, users can drag it and change the time slot to 2:00–3:00 PM). When dragged, the appointment is shown as a ghost element on the mouse cursor. A placeholder indicates the target drop area.
Appointments can also be dragged from or to the all-day appointments area. When users drag an all-day appointment to the planning area, a placeholder shows the appointment duration after dropping (default = 1 hour). Similarly, dragging a regular appointment to the all-day appointments area transforms it into an all-day appointment (default = 1 day).
For desktop devices, you can also enable the following options:
- Allow users to create appointments by clicking, dragging, and releasing on an empty space in the content area (property: enableAppointmentsCreate).
- Allow users to change the duration of an appointment by clicking and dragging one side of the appointment (property: enableAppointmentsResize).
Drag and drop
Multiple-Day Selection Mode
You can enable multiple day selection, which can be useful for operations like copy and paste.
To fulfill accessibility standards, we recommend using a selection mode toggle button in combination with keyboard shortcuts.
For an example, see Single Planning Calendar – Multiple Date Selection.
Selection Mode Toggled On
Clicking on a day or pressing Space selects the focused day. Clicking or pressing Space on the same day again deselects it.
Selecting a start and end date while holding Shift automatically selects all days in between. Holding the Shift key and moving the focus with the arrows extends the selection. Clicking the calendar week in the month view selects all days of the week.
Selection Mode Toggled Off
Users can select multiple days by holding the Cmd/Ctrl key while clicking. Selecting a start and end date while holding Shift automatically selects all days in between.
Multiple day selection in week view
Multiple day selection in month view
Responsiveness
The single planning calendar is responsive and supports the cozy and compact density modes.
On smaller screens, the custom toolbar uses the overflow behavior of the standard SAP Fiori toolbar. If the available actions don't all fit on the toolbar, an overflow menu button appears on the right of the toolbar. The rightmost actions move into the overflow menu first.
Single planning calendar - Size L
Single planning calendar - Size M and Size S
Resources
Guidelines
- Planning Calendar (guidelines)
- Date Picker (guidelines)
Implementation
- Single Planning Calendar (SAPUI5 Sample)
- Planning Calendar (SAPUI5 Sample)
- Single Planning Calendar (API)
- Planning Calendar (API)
Specification
- Calendars (visual design specification)
Guidelines
- Planning Calendar (guidelines)
- Date Picker (guidelines)
Implementation
- Single Planning Calendar (SAPUI5 Sample)
- Planning Calendar (SAPUI5 Sample)
- Single Planning Calendar (API)
- Planning Calendar (API)