Skip to content
This repository has been archived by the owner on Jul 10, 2020. It is now read-only.

morocarlo/ng2-my-datepicker

Repository files navigation

ng2-my-datepicker

Installation

To install this library, run:

$ npm install ng2-my-datepicker --save

Use Example:

import {Component} from 'angular2/core';
import {FORM_DIRECTIVES} from 'angular2/common';
import {DatePicker} from 'ng2-my-datepicker';

class Test {
  date: string;
}

@Component({
  template: `
    <datepicker [(ngModel)]="test.date"></datepicker>
    <datepicker [(ngModel)]="test1.date" view-format="DD.MM.YYYY" model-format="YYY-MM-DD" init-date="2017-05-12"></datepicker>
  `,
  directives: [DatePicker, FORM_DIRECTIVES]
})

class App {
  test: Test;
  test1: Test;
  
  constructor() {
    this.test = Test();
    this.test1 = Test();
  }
}

Update the system.config

var map = {
	....
	'ng2-my-datepicker': 'node_modules/ng2-my-datepicker/dist'
};
var packages = {
	'ng2-my-datepicker': { main: 'index.js', defaultExtension: 'js' },
}

Development

To generate all *.js, *.js.map and *.d.ts files:

$ npm run tsc

To lint all *.ts files:

$ npm run lint

License

MIT © Carlo Moretto

About

Angular2 rc.3 datepicker - DEPRECATED

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published