class RatatuiRuby::Calendar

Displays a monthly calendar grid.

Dates are complex. Rendering them in a grid requires calculation of leap years, month lengths, and day-of-week offsets. Use this widget to skip the boilerplate.

This widget renders a standard monthly view. It highlights the current date. It structures time.

Use it for date pickers, schedulers, or logs.

Examples

Calendar.new(
  year: 2025,
  month: 12,
  default_style: Style.new(fg: :white),
  header_style: Style.new(fg: :yellow, modifiers: [:bold])
)