New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@kiwigrid/ngx-daterangepicker

Package Overview
Dependencies
Maintainers
3
Versions
21
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@kiwigrid/ngx-daterangepicker

Angular Datepicker

  • 0.5.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
2
decreased by-60%
Maintainers
3
Weekly downloads
 
Created
Source

Angular DateRange Picker

This date range picker based on https://github.com/jkuri/ng-daterangepicker.

Installation

npm install @kiwigrid/ngx-daterangepicker --save

or

yarn add @kiwigrid/ngx-daterangepicker --save

Example

import { NgxDateRangePickerModule } from '@kiwigrid/ngx-daterangepicker';

// app.module.ts
@NgModule({
  ...
  imports: [ ..., NgxDateRangePickerModule, ... ],
  ...
})
export class AppModule { }
// app.component.ts
import { Component, OnInit } from '@angular/core';
import { NgxDateRangePickerOptions, NgxDateRangePickerOutput } from '@kiwigrid/ngx-daterangepicker';

@Component({
  selector: 'app-root',
  templateUrl: 'app.component.html'
})
export class AppComponent {
  value: NgxDateRangePickerOutput;
  options: NgxDateRangePickerOptions;


  ngOnInit() {
    this.options = {
	  theme: 'default',
	  range: 'tm',
	  dayNames: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'],
	  presetNames: [
	   'This Month',
	   'Last Month',
	   'This Week',
	   'Last Week',
	   'This Year',
	   'Last Year',
	   'Last 7 Days',
	   'Start',
	   'End',
	   'Apply',
	   'Cancel'
	  ],
	  dateFormat: 'yMd',
	  startOfWeek: 1,
	  position: 'right'
	};
	this.value = {
  		from: 0,
		to: 0
	};
  }
}
<!-- app.component.html -->
<ngx-daterangepicker [(ngModel)]="value" [options]="options"></ngx-daterangepicker>

Configuration

export interface NgxDateRangePickerOptions {
	theme: 'default' | 'green' | 'teal' | 'cyan' | 'grape' | 'red' | 'gray';
	range: 'tm' | 'lm' | 'lw' | 'tw' | 'ty' | 'ly';
    dayNames: string[];
    presetNames: string[];
    dateFormat: string;
    startOfWeek: number;
    position: string;
}

Running the demo

git clone https://github.com/kiwigrid/ngx-daterangepicker.git
cd ngx-daterangepicker
npm install
npm run playground

Licence

MIT

Keywords

FAQs

Package last updated on 04 Dec 2017

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