npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

ngx-resource-scheduler

v1.0.11

Published

Angular scheduler with date columns and nested resource columns or inverted

Readme

ngx-resource-scheduler

A lightweight, flexible resource scheduler for Angular.

✨ Features

  • Days ↔ Resources as primary axis
  • Configurable visible range (1–7 days)
  • Configurable working hours (e.g. 08:00–20:00)
  • Timezone-aware (UTC, local, or IANA zones)
  • Overlapping event layout
  • Slot & event click callbacks
  • Custom event rendering via ng-template
  • Built-in toolbar or external navigation
  • Clean, modern styling (system fonts)

📦 Installation

npm install ngx-resource-scheduler

Live example

Test it here.

🚀 Basic Usage

html

<ngx-resource-scheduler
  [startDate]="startDate"
  [resources]="resources"
  [events]="events">
</ngx-resource-scheduler>

TS

startDate = new Date();

resources: SchedulerResource[] = [
  { id: 'r1', title: 'Room A' },
  { id: 'r2', title: 'Room B' },
];

events: SchedulerEvent[] = [
  {
    id: 'e1',
    title: 'Meeting',
    resourceId: 'r1',
    start: new Date('2025-01-10T10:00:00Z'),
    end: new Date('2025-01-10T11:00:00Z'),
  },
];

🔧 Inputs

Required

| Input | Type | Type | | ------------- | ------------- | ------------- | | startDate | Date | First visible day (recommended at 00:00) | | resources | SchedulerResource[] | List of schedulable resources | events | SchedulerEvent[] | Events (UTC instants recommended)

Layout & Range

| Input | Default | Description | | ------------- | ------------- | ------------- | | nDays | 7 | Number of visible days (1–7) | | primaryAxis | days | days or resources | | dayStart | 08:00 | Start of visible hours | | dayEnd | 20:00 | End of visible hours | | slotDuration | 00:30 | Slot resolution | | snapToSlot | true | Snap clicks to slots |

Appearance

| Input | Default | Description | | ------------- | ------------- | ------------- | | showToolbar | true | Show built-in navigation toolbar | | showSlotLines | true | Show slot grid lines | | slotLineStyle | slot | slot, hour, or both | | readonly | false | Disable interactions | | timezone | local | local, UTC, or IANA zone (e.g. Europe/Kiev) | | todayColor | #fffadf | Any valid css color to be applied as today background color. |

Important

Events should be provided as UTC instants. The scheduler converts them for display using timezone.

i18n

| Input | Default | Description | | ------------- | ------------- | ------------- | | showDaysResourcesLabel | true | If the number of days/resources should be shown | | todayLabel | Today | Your translation for "Today" | | daysLabel | days | Your translation for "days" | | resourcesLabel | resources | Your translation for "resources" | | prevLabel | < | Your translation for "<" | | nextLabel | > | Your translation for ">" | | locale | null | Locale to be used in the dates header |

🎯 Outputs

| Output | Payload | Description | | ------------- | ------------- | ------------- | | slotClick | SchedulerSlotClick | User clicked an empty slot | | eventClick | SchedulerEventClick | User clicked an event | | rangeChange | SchedulerRangeChange | Visible date range changed | | startDateChange | Date | Navigation occurred | | eventChange | - | Under development |

🧭 Navigation example (External Controls)

You can hide the toolbar and control navigation from outside the scheduler.

<button (click)="scheduler.prev()">Prev</button>
<button (click)="scheduler.today()">Today</button>
<button (click)="scheduler.next()">Next</button>

<ngx-resource-scheduler
  #scheduler
  [showToolbar]="false"
  [nDays]="7"
  [resources]="resources"
  [events]="events">
</ngx-resource-scheduler>

No date math required.

🎨 Custom Template

Event template

You can fully customize how events are rendered.

<ngx-resource-scheduler
  [events]="events"
  [eventTemplate]="eventTpl">
</ngx-resource-scheduler>

<ng-template
  #eventTpl
  let-event
  let-startZoned="startZoned"
  let-endZoned="endZoned">
  <div>
    <strong>{{ event.title }}</strong>
    <div>
      {{ startZoned | date:'HH:mm' }}–{{ endZoned | date:'HH:mm' }}
    </div>
  </div>
</ng-template>

Event template Context

| Variable | Description | | ------------- | ------------- | | event / $implicit | The event | | startZoned | Start date in scheduler timezone | | endZoned | End date in scheduler timezone | | resourceId | Resource id | | day | Day of the cell |

Primary/secondary header template

You can fully customize how days/resources headers are rendered.

<ngx-resource-scheduler
  [events]="events"
  [primaryHeaderTemplate]="headerTpl"
  [secondaryHeaderTemplate]="headerTpl">
</ngx-resource-scheduler>

<ng-template #headerTpl let-col
  let-kind="kind"
  let-day="day"
  let-resource="resource">
  <div [ngClass]="{
      'header-day': kind === 'day',
      'header-resource': kind === 'resource'
    }">
    @if(kind === 'day') {
      <ng-container>
        📅 {{ day | date:'EEE dd' }}
      </ng-container>
    }
    @else {
      <span>
        🧔 {{ resource.title }}
      </span>
    }
  </div>
</ng-template>

Header template Context

| Variable | Description | | ------------- | ------------- | | column / $implicit | The primary/secondary column | | kind | day or resource | | title | The column title | | day | Present only when kind === 'day' | | dayKey | Present only when kind === 'day' | | resource | SchedulerResource instance. Present only when kind === 'resource' | | resourceId | Present only when kind === 'resource' | | axis | primary or secondary | | axis | primary or secondary | | index | Current header index | | primaryAxis | Current scheduler axis mode (days vs resources) |

🧩 Styling Events

HTML

<ngx-resource-scheduler
  [eventClass]="eventClass"
  [eventStyle]="eventStyle">
</ngx-resource-scheduler>

TS

eventClass = (e) => ({
  'is-important': e.title.includes('Important'),
});

eventStyle = (e) => ({
  backgroundColor: '#ffe4e6',
});

Layout styles (top, left, height, width) are managed internally and cannot be overridden.

📌 Notes

  • Drag & resize are not included in v1 (comming to v2)
  • Designed for clarity and extensibility
  • No external calendar dependencies