1.1.2 • Published 4 years ago

ng-scroll-calendar v1.1.2

Weekly downloads
40
License
MIT
Repository
github
Last release
4 years ago

NgScrollCalendar

NgScrollCalendar is a Angular Module that supports fullscreen and Lazyload on Pagescroll (Recommended for Mobile screens)

Installation

npm install ng-scroll-calendar --save

Usage

import the NgScrollCalendarModule to your module:

.
import { NgScrollCalendarModule } from 'ng-scroll-calendar';
.
.

@NgModule({
  imports: [
    NgScrollCalendarModule,
    .
    .
    ],
  declarations: [AppComponent],
  bootstrap: [AppComponent]
})
export class AppModule {}

Add the following changes to your Component

import { Component } from '@angular/core';

@Component({
  selector: 'app',
  template: `
    <input type="text" (focus)="showCalendar()">
    <ng-scroll-calendar [config]="config" (onSelect)="onDateChange($event)"></ng-scroll-calendar>
  `
})

export class AppComponent {
  config = {
    show: false,
    weekOffset: -2,
    selectedDate: new Date(),
    DisablePastDays:true
  };

  onDateChange(date) {
    console.log(date);
  }

  showCalendar() {
    this.config.show = true;
  }
}

Supported API

Properties

@Input()  config
KeyTypeRequiredDefaultDescription
showBooleanYesfalseUsed for Calendar visibility
selectedDateDateOptionalCurrent Dated-active class will be added to the selected date
weekOffsetNumberOptional-2Number of Weeks to be Skipped(eg. 2)/Added(eg: -2)
DisablePastDaysBooleanOptionalfalseDisable/Enable past Days

Events

@Output()TypeDescription
onSelectEventEmitterReturns the Selected date.

Style Guide

Class NameDescription
.date-itemwill be added to all the date tiles
.disabledwill be added to the dates which are disabled
.d-activewill be added to the selected date
.todaywill be added when date = today
1.1.2

4 years ago

1.1.1

4 years ago

1.1.0

5 years ago

1.0.15

5 years ago

1.0.14

5 years ago

1.0.13

5 years ago

1.0.12

5 years ago

1.0.11

5 years ago

1.0.10

5 years ago

1.0.9

5 years ago

1.0.8

5 years ago

1.0.7

5 years ago

1.0.6

5 years ago

1.0.5

5 years ago

1.0.4

5 years ago

1.0.3

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago