Calendar

TsgcHTMLComponent_Calendar — render a month-grid calendar with coloured event dots, a today highlight and previous/next navigation, in Delphi, C++ Builder and .NET.

TsgcHTMLComponent_Calendar

Set the Year and Month, add events on specific days (or bind a dataset), then read the HTML property.

Component class

TsgcHTMLComponent_Calendar

Renders

Bootstrap 5 card with a month-grid <table>

Family

Data & Tables

Languages

Delphi, C++ Builder, .NET

Set the month, add events, render it

Set Year and Month, push a few Events.Add entries with a Day, Title and Color, then read HTML.

uses
  sgcHTML_Component_Calendar;

var
  oCal: TsgcHTMLComponent_Calendar;
  oEvt: TsgcHTMLCalendarEvent;
begin
  oCal := TsgcHTMLComponent_Calendar.Create(nil);
  try
    oCal.Year := 2026;
    oCal.Month := 6;
    oCal.HighlightToday := True;
    oCal.ShowNavigation := True;

    oEvt := oCal.Events.Add;
    oEvt.Day := 12;
    oEvt.Title := 'Release';
    oEvt.Color := '#7C3AED';

    WebModule.Response := oCal.HTML;   // card + month-grid table
  finally
    oCal.Free;
  end;
end;

// Or bind it straight to a dataset:
oCal.LoadFromDataSet(qryEvents, 'EventDate', 'Subject');
// includes: sgcHTML_Component_Calendar.hpp

TsgcHTMLComponent_Calendar *oCal = new TsgcHTMLComponent_Calendar(NULL);
try
{
  oCal->Year = 2026;
  oCal->Month = 6;
  oCal->HighlightToday = true;
  oCal->ShowNavigation = true;

  TsgcHTMLCalendarEvent *oEvt = oCal->Events->Add();
  oEvt->Day = 12;
  oEvt->Title = "Release";
  oEvt->Color = "#7C3AED";

  String html = oCal->HTML;   // card + month-grid table
}
__finally
{
  delete oCal;
}
using esegece.sgcWebSockets;

var cal = new TsgcHTMLComponent_Calendar();
cal.Year = 2026;
cal.Month = 6;
cal.HighlightToday = true;
cal.ShowNavigation = true;

var evt = cal.Events.Add();
evt.Day = 12;
evt.Title = "Release";
evt.Color = "#7C3AED";

string html = cal.HTML;   // card + month-grid table

Key properties & methods

The members you reach for most often.

Month

Year and Month select the grid; they default to the current month, and GetMonthName drives the heading.

Events

Events holds items with a Day, Title, hex Color and enum ColorStyle; each event renders as a coloured dot under its day.

Dataset binding

LoadFromDataSet(aDataSet, aDateField, aTitleField) creates one event per row that falls inside the current month and year.

ShowNavigation with PrevURL and NextURL renders previous/next links; NavButtonClass styles them.

Today

HighlightToday marks the current day using the classes in TodayClass.

Appearance

TableClass, EventDotSize and CalendarID tune the table styling and dot size.

Keep exploring

All sgcHTML ComponentsBrowse the full feature matrix of 60+ components.
Download Free TrialThe 30-day trial ships the 60.HTML demo projects.
PricingSingle, Team and Site licenses with full source code.

Ready to Get Started?

Download the free trial and start building web UIs in Delphi, C++ Builder and .NET.