Angular Material Clock Time Picker

Author: owsolutions
Official Page: Go to website
Publish Date: December 7, 2017
License: MIT

Description:

Just another clock-style time picker component for Angular Material app.

See Also:

Installation:

# NPM
$ npm install angular-material-clock-time-picker --save

Usage:

app.module.ts:

import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';
import { MatButtonModule, MatDialogModule, MatFormFieldModule, MatInputModule} from '@angular/material';
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
import { AppComponent } from './app.component';
import { TimePickerComponent } from './time-picker/time-picker.component';
import { MatTimePickerDirective } from './time-picker/mat-timepicker.directive';

@NgModule({
  declarations: [
    AppComponent,
    TimePickerComponent,
    MatTimePickerDirective
  ],
  imports: [
    BrowserModule,
    MatButtonModule,
    MatFormFieldModule,
    BrowserAnimationsModule,
    MatDialogModule,
    MatInputModule
  ],
  providers: [],
  bootstrap: [
    AppComponent
  ],
  entryComponents: [
    TimePickerComponent
  ]
})
export class MatTimePickerModule { }

app.component.html:

<mat-form-field class="example-full-width">
  <input mat-timepicker matInput type="time" placeholder="Click to get the time" value="10:55 AM">
</mat-form-field>

Preview:

Angular Material Clock Time Picker


You Might Be Interested In:

Add Comment