Skip to content

Calendar

Introduction

The Calendar control renders data as a full-featured calendar, based on the full-calendar library. It displays dataset records as calendar events, using one date/time field for the event start and another for the event end.

Description

Use the Calendar control when you want to show meeting schedules, bookings, deadlines or other time-based events in a monthly, weekly or daily calendar view.

The control binds to a dataset and uses these data mappings:

  • DataSet: the source dataset containing the calendar items.
  • Display Member: the text shown on calendar events.
  • Value Member: the start date/time of the event.
  • Second Value Member: the end date/time of the event.

You can also render event items with custom HTML by selecting a partial view in the Event Partial View property. This enables custom event templates while keeping the built-in calendar behavior. The selected partial view receives an input context variable named after the calendar control with the suffix _CurrentItem (for example Calendar_CurrentItem). The type of this variable is the same as the dataset item type bound to the calendar.

Behavior

  • Default View selects the initial calendar view shown when the form is rendered.
  • Available Views determines which calendar modes the user may switch between.
  • Height Mode and Aspect Ratio control the calendar's overall size and responsive layout.
  • Explicit Height can fix the control height when a specific pixel value is needed.
  • Cache Results controls whether dataset results are cached or reloaded on every render.

Events

The Calendar supports event-driven actions such as:

  • On Click — when the user clicks an event.
  • On Change — when the selected view or event selection changes.
  • On Double Click — if a double-click action is available.
  • On Mouse Enter / On Mouse Leave — when the pointer enters or leaves an event.

Options

Data

Name Description
Dataset Select the dataset that contains calendar records.
Display Member The field used as the event title on the calendar.
Value Member The field used as the event start date/time.
Second Value Member The field used as the event end date/time.
Date From / Date To Optional dataset filters for the visible date range. These values are populated from the calendar's current visible range and can be used in dataset filtering so only relevant events are loaded.

When the calendar requests data, it fills Date From and Date To with the visible start/end range. Use them in your dataset filter to avoid loading all records and improve performance.

Example:

function bool Filter(
    Domain.Meeting DataItem
)
{
    return DataItem.Start > Model.CalendarFrom
        && DataItem.End < Model.CalendarTo;
}

View and Layout

Name Description
Default View Sets the initial view shown on load (Month, Week, Day, etc.).
Available Views Choose which calendar views are available to the end user.
Height Mode Select how the calendar adapts vertically.
Aspect Ratio Controls the calendar width/height ratio.
Explicit Height Use a fixed height when needed.

Appearance

Name Description
Color Choose a theme color for the control.
Variation Apply a visual variation or preset.
CSS Classes Add custom CSS classes to the control.
Css Style Add inline CSS styling for custom presentation.

Advanced

Name Description
Cache Results If checked, dataset results may be cached for better performance.
Apply On Blur Determines whether value changes are applied when focus leaves the control.
Does Not Make Form Dirty When enabled, the control does not mark the form as modified.

Features

  • Displays events in a monthly, weekly or daily calendar layout.
  • Supports event text, start/end times, and dataset binding.
  • Integrates with full-calendar for rich navigation and rendering.
  • Can fire actions for clicks, changes and hover interactions.
  • Supports responsive sizing through Height Mode and Aspect Ratio.
  • Works with dataset inputs and date filters to load only relevant events.
  • Allows runtime access from code to retrieve the selected date and selected event(s).
  • Supports conditional formattings so event CSS styles can change dynamically based on event data.

Runtime access from code

From Mamba code you can read the calendar's selection directly. For example, to show details about the currently selected meeting event:

function void ShowSelectedMeetingDetails()
{
    var selectedDate = FormControls.Calendar.SelectedDate;
    var selectedMeeting = FormControls.Calendar.SelectedItem;
    var meetingTitle = selectedMeeting.Description;
    var meetingStart = selectedMeeting.Start;
    var meetingEnd = selectedMeeting.End;

    ShowMessage(string.Format(
        "Selected meeting: {0}\nStart: {1}\nEnd: {2}\nDate: {3}",
        meetingTitle,
        meetingStart,
        meetingEnd,
        selectedDate
    ));
}

This allows you to build real workflows such as displaying the selected event details, validating the chosen meeting, or opening a related form based on the selected calendar item.

Example

A typical Calendar configuration uses a dataset such as MeetingDataSet, with Description as the display member, Start as the value member, and End as the second value member.

When configured this way, each meeting record appears as a calendar event spanning from its start time to its end time, showing the record description inside the event block.

Back to top