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 🙏

© 2024 – Pkg Stats / Ryan Hefner

angular-calendar-ui

v1.1.7

Published

## About

Downloads

6

Readme

AngularCalendarUi

About

A calendar component for angular that can display events on a month view.

Getting started

Installation

npm install angular-calendar-ui

Manual Setup

A little configuration needs to be done in order to work with our package dependencies

Make sure the following are enabled in tsconfig.json file

{
  "compilerOptions": {
    "esModuleInterop": true,
    "allowSyntheticDefaultImports": true,
  }
}

Install ng-bootstrap. Run this command

ng add @ng-bootstrap/ng-bootstrap

Include boostrap and boostrap icons in the styles in angular.json file of your app:

{
  "styles": [
      "node_modules/bootstrap/dist/css/bootstrap.min.css",
      "node_modules/bootstrap-icons/font/bootstrap-icons.css",
      "src/styles.css"
    ],
}

Finally import angular-calender-ui module and ng-boostrap module into your apps module:

import { NgModule } from "@angular/core";
import { BrowserModule } from "@angular/platform-browser";
import { AngularCalendarUiModule } from "angular-calendar-ui";
import { AppComponent } from "./app.component";
import { NgbModule } from "@ng-bootstrap/ng-bootstrap";

@NgModule({
  declarations: [AppComponent],
  imports: [BrowserModule, AngularCalendarUiModule, NgbModule],
  providers: [],
  bootstrap: [AppComponent],
})
export class AppModule {}

Usage

Inputs that are needed to show events and customize calendar are:

  1. Events
  2. Dimensions
  3. Colors
  4. Fonts
  5. Icons

Events:

Events is an array of objects where each object represents an event that consist of

  • color: Background color(string)
  • startDate: Starting date time of the event(ISO format)
  • endDate: End date time of the event(ISO format)
  • name: Name of the event(string)
  • htmlDetails/details: htmlDetails- description of the event in the form of html.(string) details- description of the event(string)

Note: Each event should contain either details or htmlDetails

Example:

[
  {
    color: "#d1ebfe",
    startDate: "2023-01-01T02:11:58.421Z",
    endDate: "2023-01-01T03:11:58.421Z",
    name: "New Year",
    htmlDetails: "<h1>This is H1</h1>",
  },
  {
    color: "#d0eadc",
    startDate: "2023-01-18T10:11:58.421Z",
    endDate: "2023-01-18T14:11:58.421Z",
    name: "Birthday",
    details: "Its my Birthday",
  },
];

Colors:

Colors is an object to customize font color and background color.

  • monthYearFont: Font color of month and year(string)
  • weekDaysBg: Background color of week days(string)
  • otherMonthDaysFont: Font color of days of next or previous month(string)
  • weekendDaysBg: Background color of weekend days(string)
  • weekendDaysFont: Font color of weekend days(string)
  • todayFont: Font color of today(string)
  • weekDaysFont: Font color of week days(string)
  • todayBg: Backgroung color of today(string)
  • weekNameFont: Font color of week names(string)
  • seperatorColor: Color of the line seperator(string)
  • seperatorTopColor: Color of top lone seperator(string)
  • todayBtnColor: Color of today button(string)

Note: If the user provides empty string "" then default color is assigned.

colors = {
  monthYearFont: "",
  weekDaysBg: "",
  otherMonthDaysFont: "",
  weekendDaysBg: "",
  weekendDaysFont: "",
  todayFont: "",
  weekDaysFont: "",
  todayBg: "",
  weekNameFont: "",
  seperatorColor: "",
  seperatorTopColor: "",
  todayBtnColor: "",
};

Fonts:

Fonts is an object to customize the size of the fonts in the calendar.

  • monthYear: Font size of the month and year(string)
  • weekName: Font size of week names(string)
  • date: Font size of the date(string)
  • event: Font size of the event(string)

Note: If the user provides empty string "" then default font size is assigned.

fonts = {
  monthYear: "",
  weekName: "25px",
  date: "25px",
  event: "",
};

Icons:

To customize next and previous button, html can be passed as input to the component.

  • color: Color of the icon(string)
  • prevBtn: Html for prev button(stirng)
  • nextBtn: Html for next button(String)
icons = {
  color: "",
  prevBtn: '<i class="bi bi-arrow-left-square"></i>',
  nextBtn: '<i class="bi bi-arrow-right-square"></i>',
};

Note: If the user provides empty string "" then default icons are assigned. we are using bootstrap icons as defualt icons.

Dimensions:

To customize the dimensions of the calendar

  • length: Lenght of the calendar(string)
  • width: Width of the calendar(string)
dimensions = {
  length: "",
  width: "",
};