Gathering detailed insights and metrics for pg-range-datepicker
Gathering detailed insights and metrics for pg-range-datepicker
npm install pg-range-datepicker
Typescript
Module System
Node Version
NPM Version
69
Supply Chain
95.6
Quality
75.2
Maintenance
100
Vulnerability
98.6
License
TypeScript (55.84%)
HTML (25.01%)
SCSS (19.14%)
Love this project? Help keep it running — sponsor us today! 🚀
Total Downloads
209
Last Day
1
Last Week
7
Last Month
19
Last Year
166
4 Commits
1 Watchers
1 Branches
1 Contributors
Updated on Apr 22, 2023
Minified
Minified + Gzipped
Latest Version
1.0.0
Package Id
pg-range-datepicker@1.0.0
Unpacked Size
170.04 kB
Size
22.70 kB
File Count
16
NPM Version
8.5.0
Node Version
16.14.2
Published on
Apr 23, 2023
Cumulative downloads
Total Downloads
Last Day
0%
1
Compared to previous day
Last Week
75%
7
Compared to previous week
Last Month
90%
19
Compared to previous month
Last Year
286%
166
Compared to previous year
1
2
A datepicker (single or range) for your angular app.
npm install pg-range-datepicker
or yarn add pg-range-datepicker
.import { PgRangeDatepickerModule } from 'pg-range-datepicker'
.<pg-range-datepicker></pg-range-datepicker>
.Here's an example of basic usage:
app.module.ts
1import { NgModule } from '@angular/core'; 2import { BrowserModule } from '@angular/platform-browser'; 3import { AppComponent } from './app.component'; 4 5import { PgRangeDatepickerModule } from 'pg-range-datepicker'; 6 7@NgModule({ 8 declarations: [ 9 AppComponent 10 ], 11 imports: [ 12 BrowserModule, 13 PgRangeDatepickerModule 14 ], 15 providers: [], 16 bootstrap: [AppComponent] 17}) 18export class AppModule { }
app.component.html
1<pg-range-datepicker 2 [selectedDate]="(selectedDate)" [selectedDateEnd]="(selectedDateEnd)"> 3</pg-range-datepicker>
app.component.ts
1import { Component, OnInit } from '@angular/core'; 2 3@Component({ 4 selector: 'app-root', 5 templateUrl: './app.component.html', 6 styles: [] 7}) 8export class AppComponent imlements OnInit { 9 selectedDate = new Date(); 10 selectedDateEnd = new Date(); 11 12 constructor() {} 13 14 ngOnInit() {} 15}
Prop name | Description | Default value | Example values |
---|---|---|---|
[(selectedDate)] | Set or get the date. | undefined | new Date() |
[(selectedDateEnd)] | Set or get the end date for the range selector. | undefined | new Date() |
[allowRange] | Allow selecting the date range | true | true |
[allowClear] | Display clear btn after date is selected. | true | true |
[displayTwoMonths] | Show 2 months calendar on the datepicker. | true | true |
[disablePastDates] | Disable all the dates less than today's date. | false | false |
[disabledDates] | List of dates you want to disable. | [] | [new Date(new Date().setDate(20)), new Date(new Date().setDate(25)), new Date(new Date().setDate(26))] |
[min] | Minimum date that the user can select. | undefined | new Date() |
[max] | Maximum date that the user can select. | undefined | new Date() |
[disabled] | Whether the date picker should be disabled. | false | false |
![]() |
Prashant Goel prashantgoel60@gmail.com |
No vulnerabilities found.
No security vulnerabilities found.