Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@protacon/ngx-resource-calendar

Package Overview
Dependencies
Maintainers
0
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@protacon/ngx-resource-calendar

Resource calendar for Angular

  • 3.0.0
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
29
decreased by-67.78%
Maintainers
0
Weekly downloads
 
Created
Source

NgxResourceCalendar

What is this?

Resource calendar for Angular 18+

Install

Step 1: Install @protacon/ngx-resource-calendar

$ npm install --save @protacon/ngx-resource-calendar

Step 2: Import the module

Add NgxResourceCalendarModule as an import in your app's root NgModule.

import { NgxResourceCalendarModule }  from '@protacon/ngx-resource-calendar';

@NgModule({
  ...
  imports: [
    ...
    NgxResourceCalendarModule,
  ],
  ...
})
export class AppModule { }

Usage

Simple usage example

<pinja-resource-calendar
  [dates]="dates"
  [events]="events"
  [startHour]="8"
  [endHour]="17"
  [infoTemplate]="infoTemplate"
  [hourTemplate]="hourTemplate"
>
</pinja-resource-calendar>
<ng-template #infoTemplate> Info view </ng-template>
<ng-template #hourTemplate let-slot="slot">
  <div>{{ slot.time | data: 'shortTime' }}</div>
</ng-template>
AttributeDescriptionTemplate output
datesSpecifies the dates and resources which calendar shows
eventsEvents to show in calendar
slotDurationInMinutesHow many minutes one slot is in the hour row. Default 15 minutes.
heightHeigh of one slot in pixels. Default 60px.
startHourFirst hour in the calendar.
endHourLast hour in the calendar.
infoTemplateA custom template to use for the header empty space top of hours.-
dayTemplateA custom template to use for day view in headerday = DateModel
resourceTemplateA custom template to use for day view resource in header (below day template)resource = ResourceModel
hourTemplateA custom template to use for hour view (left to calendar)time = Date
eventTemplateA custom template to use for eventsevent = EventModel, resource = ResourceModel, day = DayModel
slotTemplateA custom template to use for slotsslot = SlotModel, resource = ResourceModel, day = DayModel
currentTimeTemplateA custom template to show current time etc. custom overlayday = DateModel

Testing locally updated package

$ npm run build
$ cd dist/ngx-resource-calendar
$ npm pack

Copy protacon-ngx-resource-calendar-0.0.1.tgz from dist/ngx-resource-calendar to other project root and change to package.json "@protacon/ngx-resource-calendar": "file:protacon-ngx-resource-calendar-0.0.1.tgz",

License

The MIT License (MIT)

Copyright (c) 2020 Pinja

FAQs

Package last updated on 22 Aug 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc