0.0.2 • Published 6 years ago

ng-time-value-accessor v0.0.2

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

WIP: ng-time-value-accessor

Build Status npm version

A time value accessor for Angular 5+, can be used for inputtime. Instead of 'hh:mm', the time will be converted to seconds since '00:00'.

Examples:

Add the attribute timeAsSec to a date input control:

<input type="time" name="begin" [(ngModel)]="begin" timeAsSec>

OR

<input type="time" formControlName="begin" timeAsSec>

Installation:

Install the package via yarn/npm:

yarn add ng-time-value-accessor
npm install --save ng-time-value-accessor

Then import the module via NgModule:

// app.module.ts

import { TimeValueAccessorModule } from "ng-time-value-accessor";

@NgModule({
  imports: [TimeValueAccessorModule]
})
export class AppModule {}