1.3.0 • Published 5 years ago

ng-ts-datepicker v1.3.0

Weekly downloads
6
License
MIT
Repository
github
Last release
5 years ago

Build Status

NgTsDatepicker

Angular (6+) directive which wraps http://eonasdan.github.io/bootstrap-datetimepicker/ component.

image

Installation

npm install ng-ts-datepicker --save

Usage

Import module

import { NgTsDatepickerModule } from 'ng-ts-datepicker';
. . .
@NgModule({
  . . .
  imports : [
    . . .
    NgTsDatepickerModule
  ]

Styles

Add .css file from ng-ts-datepicker/styles.min.css (or add it to styles array in .angular-cli.json if you are using it)

Use component

Put it inside a element with input-group class so it gets proper icon displayed:

<div class="input-group">
  <input class="form-control"
    ngTsDatepicker
    [(date)]="datepickerValue"
    [options]="datepickerOptions"
    (change)="dateChange($event)"
    (click)="dateClick()">
</div>
  datepickerOptions = {
    allowInputToggle: true,
    format: DATETIME_FORMAT,
    showClear: true,
    showClose: true
  };
  datepickerValue = null;

  dateChange(date: date) {}

  dateClick() {}

Properties

Events

  • change - once date is changed it will emit date object
  • click - once date picker is clicked with empty value

Dependencies

They are already in package.json, but here is a list:

Release notes

  • 1.3.0
    • Breaking change: Added support for Angular6+. Now only support Angular6+, for below version, use 1.2.0
  • 1.2.0
    • added styles.min.css
  • 1.0.0
    • first stable version
1.3.0

5 years ago

1.2.0

6 years ago

1.1.3

6 years ago

1.1.2

6 years ago

1.1.1

6 years ago

1.1.0

6 years ago

1.0.0

6 years ago

0.9.3

6 years ago

0.9.2

6 years ago

0.9.0

6 years ago

0.0.5

6 years ago

0.0.4

6 years ago

0.0.3

6 years ago

0.0.2

6 years ago

0.0.1

6 years ago