Socket
Book a DemoInstallSign in
Socket

ng-pick-daterange

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ng-pick-daterange

Angular Date Range Picker Component

1.0.0
latest
Source
npmnpm
Version published
Maintainers
1
Created
Source

Angular Date Range Picker

Angular date range picker - Angular reusable UI component

Description

Simple Angular date range picker. Online demo is here. This picker is responsive design, so feel free to try it in your desktops, tablets and mobile devices. This picker uses javascript library date-fns

Installation

To install this component, follow the procedure:

  • Install with npm:npm install ng-pick-daterange --save
  • Add DateRangePickerModule import to your @NgModule like example below
    import { NgModule } from '@angular/core';
    import { BrowserModule } from '@angular/platform-browser';
    import { MyTestApp } from './my-test-app';
    
    import { DateRangePickerModule } from 'ng-pick-daterange';
    
    @NgModule({
        imports:      [ BrowserModule, DateRangePickerModule ],
        declarations: [ MyTestApp ],
        bootstrap:    [ MyTestApp ]
    })
    export class MyTestAppModule {}
    
  • If you are using systemjs package loader add the following dateRangePicker properties to the System.config:
    (function (global) {
        System.config({
            paths: {
                'npm:': 'node_modules/'
            },
            map: {
                // Other components are here...
    
                'ng-pick-daterange': 'npm:ng-pick-daterange',
            },
            packages: {
                // Other components are here...
    
    			// the picker
                'ng-pick-daterange': {
                    main: 'index.js',
                    defaultExtension: 'js'
                },
            }
        });
    })(this);
    

Usage

Use the following snippet inside your template. For example:

<app-date-range [(dateRange)]="dateRange"></app-date-range>

Or:

<app-date-range [dateRange]="dateRange" (dateRangeChange)="setReturnValue($event)"></app-date-range>
public setReturnValue(dateRange: IDateRange): any {
    this.dateRange = dateRange;
    // Do whatever you want to the return object 'dateRange'
}

Demo

Online demo is here

License

  • License: MIT

Author

  • Author: Daniel Pan

Keywords

Angular

FAQs

Package last updated on 05 Apr 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

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.