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

angular-kalendar

v2.0.0

Published

Angular 2 Datetime Picker/Calendar

Readme

Angular (Angular 2) Kalendar

Image

Getting Started

Npm Install

$ npm install angular-kalendar

Importing the module

import { NgModule } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';

import { AppComponent } from './app.component';
import { AngularKalendarModule } from 'angular-kalendar';

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

Using the Component

Basic Usage
<angular-kalendar></angular-kalendar>
Using NgModel
<angular-kalendar [(ngModel)]="date" (ngModelChange)="doSomething()"></angular-kalendar>
...
export class Component implements OnInit {
    date: Date;
}
Using Model Driven Forms
<form [formGroup]="formGroup" (ngSubmit)="onSubmit()">
  <angular-kalendar [formControl]="formGroup.get('date')"></angular-kalendar>
  <button type="submit">SUBMIT</button>
  <button type="button" (click)="reset()">Reset</button>
</form>
...
export class FormGroupComponent implements OnInit {
    formGroup: FormGroup;

    ngOnInit() { 
        this.formGroup = new FormGroup({
            'date': new FormControl(new Date())
        });
    }

    onSubmit(): void {
		//do something
    }

    reset(): void {
        this.formGroup.reset({
            'date': new Date()
        });
    }
}

Calendar Options

Angular Kalendar accepts an input called 'options'

<angular-kalendar [options]="myOptions"></angular-kalendar>
...
import { KalendarOptions } from 'angular-kalendar';

export class Hours12Component implements OnInit {
    options: KalendarOptions = {
        format: 'dd.mm.yyyy',
        showTimepicker: false
    }
}

Options

interface KalendarOptions {
    format?: string,
    hours24?: boolean,
    showTimepicker?: boolean
}

format

DEFAULT: 'yyyy-mm-dd H:MM'

Format string accepts the following values

| Format String | Description | |---------------|-------------| | d | day of the month| |dd | day of the month, zero padded| | m | month (eg. 3)| | mm | month, zero padded (eg. 03)| | mmm | month text, short (eg. Mar)| | mmmm | month text, long (eg. March) | |yy | double digit year (eg. 2007 becomes 07)| |yyyy|full year (eg. 2007)| |H|hour value| |HH| hour value, zero padded| |MM| minute value| Examples:

  • dd.mm.yyyy -> 03.01.1997
  • m/d/yy -> 1/3/97
  • yyyy-mm-dd H:MM -> 1997-01-03 15:38

hours24

DEFAULT: true.

If true, display hours 0-23 If false, display hours 1-12 AM, 1-12 PM

showTimepicker

DEFAULT: true.

If true, show the timepicker under the calendar If false, don't

CSS

Don't like the way it looks? You can override the existing styles in the following manners

Inline Styles:
@Component({
    selector: 'my-component',
    template: `
    <angular-kalendar class="kalendar"></angular-kalendar>
    `,
    styles: [`
        :host /deep/ .kalendar .ang2cal-btn:hover {
            background-color: blue;
            color: white;
            border-radius: 0;
        }
    `]
})
Global Styles (angular-cli example)

In angular-cli.json

styles: [
	"styles.css"
]

In styles.css

.kalendar .ang2cal-day {
	background-color: pink;
    border: 1px solid grey;
    border-radius: 0;
}