HtmlForgeX

API Reference

Class

EmailCalendar

Namespace HtmlForgeX.Email
Assembly HtmlForgeX.Email
Base Element
Implements

Email-safe month calendar rendered using table markup. Designed for event invitations, schedules and reminders in Outlook/Gmail.

Inheritance

Constructors

Methods

public EmailCalendar ConfigureDay(DateTime date, Action<EmailCalendarDay> configure) #
Returns: EmailCalendar

Configures a single day by date.

Parameters

date System.DateTime requiredposition: 0
configure System.Action{HtmlForgeX.Email.EmailCalendarDay} requiredposition: 1
public EmailCalendar SelectDate(DateTime date) #
Returns: EmailCalendar

Marks a date as selected.

Parameters

date System.DateTime requiredposition: 0
public override String ToString() #
Returns: String
public EmailCalendar WithMonth(Int32 year, Int32 month, Nullable<DayOfWeek> weekStartsOn = null, CultureInfo culture = null) #
Returns: EmailCalendar

Creates a calendar for a given month (auto-populates Days).

Parameters

year System.Int32 requiredposition: 0
month System.Int32 requiredposition: 1
weekStartsOn System.Nullable{System.DayOfWeek} = null optionalposition: 2
culture System.Globalization.CultureInfo = null optionalposition: 3

Properties

public String Title { get; set; } #

Calendar title (usually month + year).

public List<EmailCalendarDay> Days { get; } #

Calendar days (typically 42 entries).

public Boolean ShowWeekdays { get; set; } #

Whether to show weekday labels.

public DayOfWeek WeekStartsOn { get; set; } #

Week start day.

public String DaySize { get; set; } #

Day cell size (e.g. "44px").

public Int32 CellGapPx { get; set; } #

Gap between day cells in pixels.

public String DayBorderRadius { get; set; } #

Day cell border radius.

public String DayBackgroundColor { get; set; } #

Day cell background color.

public String DayBorderColor { get; set; } #

Day cell border color.

public String DayTextColor { get; set; } #

Text color for in-month days.

public String OutsideMonthTextColor { get; set; } #

Text color for out-of-month days.

public String OutsideMonthBackgroundColor { get; set; } #

Background color for out-of-month days.

public String SelectedBackgroundColor { get; set; } #

Selected day background color.

public String SelectedTextColor { get; set; } #

Selected day text color.

public String TodayBorderColor { get; set; } #

Today border color.

public String TitleColor { get; set; } #

Title color (theme-aware by default).

public String WeekdayColor { get; set; } #

Weekday label text color.

public String WeekdayFontSize { get; set; } #

Weekday label font size.

public String DayFontSize { get; set; } #

Day number font size.

public String TitleFontSize { get; set; } #

Title font size.