Moey Icons
No results. Try “dialog”, “dark” or “grid”.
Moey extras

Calendar

Month, week, day and agenda views of your events — from a simple list in the HTML, or from data. Overlapping meetings sit side by side, all-day events get their own row, and on a phone it becomes the familiar compact month with the chosen day's list underneath.

  • Design review
  • Supplier call
  • Standup
  • Lunch with Ana
  • Standup
  • Stock count
  • Photo shoot
  • Standup
  • Standup
  • New product page review
  • Call with the warehouse
  • Interview: support role
  • Marketing sync
  • Packing day
  • Black Friday sale
  • Team dinner
  • Standup
  • Holiday campaign

Click an event, a day or (in week and day views) a time slot.

<div class="calendar" data-moey-calendar data-moey-hours="7-20">
  <ul class="calendar-data">
    <li data-start="2026-11-24T09:00" data-end="2026-11-24T09:30" data-color="blue">Standup</li>
    <li data-start="2026-11-24T10:00" data-end="2026-11-24T11:30" data-color="purple">New product page review</li>
    <li data-start="2026-11-27" data-end="2026-11-30" data-color="red">Black Friday sale</li>
  </ul>
</div>

<script>
  cal.addEventListener('moey:event', (e) => openEvent(e.detail.event));          // { id, title, start, end, color, allDay }
  cal.addEventListener('moey:pick', (e) => newEvent(e.detail.date, e.detail.time)); // a day, or a time slot
  cal.addEventListener('moey:change', (e) => load(e.detail.start, e.detail.end)); // the dates on screen changed
</script>

An event with only dates (data-start="2026-11-27") is all day; its data-end is the last day. With a time, it is placed on the hours. A link (href on the <li>) is followed when the event is clicked.

Week and day

Start in a view with data-moey-view="week". Meetings that overlap share the width; a red line shows the time now; clicking an empty slot reports the half hour (moey:pick).

  • Photo shoot
  • Standup
  • Standup
  • New product page review
  • Call with the warehouse
  • Interview: support role
  • Marketing sync
  • Packing day
  • Black Friday sale
  • Team dinner

Agenda

A plain list of the next two weeks — easy to scan, and the best fit for narrow spaces like a sidebar.

  • Design review
  • Supplier call
  • Standup
  • Lunch with Ana
  • Standup
  • Stock count
  • Photo shoot
  • Standup
  • Standup
  • New product page review
  • Call with the warehouse
  • Interview: support role
  • Marketing sync
  • Packing day
  • Black Friday sale
  • Team dinner
  • Standup
  • Holiday campaign

On phones

The calendar follows its own width: under 640px the month shows compact days with dots and the chosen day's events underneath, and the week becomes a strip of days with one day's hours.

Month — tap a day
Week — a day at a time

From JavaScript

const cal = Moey.calendar('#cal', {
  view: 'month',                       // month · week · day · agenda
  events: [
    { id: 7, title: 'Standup', start: '2026-11-24T09:00', end: '2026-11-24T09:30', color: 'blue' },
    { id: 8, title: 'Black Friday sale', start: '2026-11-27', end: '2026-11-30', color: 'red' },
  ],
});
cal.add({ title: 'Dentist', start: '2026-11-25T08:00', end: '2026-11-25T08:30' });
cal.remove(7);
cal.view('week'); cal.go('2026-12-01'); cal.next(); cal.prev(); cal.today();
cal.setEvents(listFromServer);         // e.g. in moey:change, for the dates on screen

Keyboard

In the month, ← → ↑ ↓ move by day and week (into the next month too), Home / End go to the start or end of the week, Page Up / Page Down change the month, and Enter picks the day. Events are buttons, read out with their times. The week starts on the right day for the page's language (lang), or set data-moey-week-start (0 = Sunday, 1 = Monday).

Reference

Class / attributeWhat it does
.calendar[data-moey-calendar]The calendar, with its toolbar (previous / next, Today, the title, the views)
data-moey-view="month|week|day|agenda" · data-moey-views="month,week"The first view · the views offered (one hides the switcher)
data-moey-date="2026-11-24" · data-moey-hours="7-20" · data-moey-week-start="1"The day it opens on (today) · the hours shown in week and day (all 24) · the first day of the week
data-moey-toolbar="false"No toolbar — drive it from your own buttons with the API
.calendar-data > li with data-start · data-end · data-color · data-id · hrefAn event (dates only = all day; the end day is included)
--mo-calendar-heightThe scrolling height of week and day (32rem); they start at 8:00
Events moey:event · moey:pick · moey:change{ event } (cancelable: stops the link) · { date, time, allDay } · { view, start, end, date }
Moey.calendar(el, { view, views, date, hours, events }){ view(name), go(date), next(), prev(), today(), add(event), remove(id), setEvents(list), events }