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

ng2-daterangepicker

Package Overview
Dependencies
Maintainers
1
Versions
22
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ng2-daterangepicker - npm Package Compare versions

Comparing version

to
2.0.5

1

lib/daterangepicker/daterangepicker.component.d.ts

@@ -15,2 +15,3 @@ import { AfterViewInit, EventEmitter, ElementRef, OnDestroy } from '@angular/core';

showDaterangepicker: EventEmitter<{}>;
datePicker: any;
constructor(input: ElementRef, config: DaterangepickerConfig);

@@ -17,0 +18,0 @@ ngAfterViewInit(): void;

@@ -34,2 +34,3 @@ "use strict";

$(this.input.nativeElement).daterangepicker(targetOptions, this.callback.bind(this));
this.datePicker = $(this.input.nativeElement).data('daterangepicker');
$(this.input.nativeElement).on('cancel.daterangepicker', function (e, picker) {

@@ -36,0 +37,0 @@ var event = { event: e, picker: picker };

2

package.json
{
"name": "ng2-daterangepicker",
"version": "2.0.4",
"version": "2.0.5",
"description": "Angular 2 DaterangePicker component",

@@ -5,0 +5,0 @@ "scripts": {

@@ -142,2 +142,26 @@ ## ng2-daterangepicker

## Daterangepicker methods
You can programmatically update the `startDate` and `endDate` in the picker using the `setStartDate` and `setEndDate` methods. You can access the Date Range Picker object and its functions and properties through the `datePicker` property of the directive using `@ViewChild`.
``` javascript
import { Component, AfterViewInit, ViewChild } from '@angular/core';
import { DaterangePickerComponent } from 'ng2-daterangepicker';
@Component({
selector:'my-app',
template:'<h3>Component Template</h3>'
})
export class AppComponent {
@ViewChild(DaterangePickerComponent)
private picker: DaterangePickerComponent;
public updateDateRange() {
this.picker.datePicker.setStartDate('2017-03-27');
this.picker.datePicker.setEndDate('2017-04-08');
}
}
```
## Using Daterangepicker Events

@@ -144,0 +168,0 @@

Sorry, the diff of this file is not supported yet