Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/owsolutions/amazing-time-picker
Timepicker (Clock Picker) for Angular 2, Angular 4 and Angular 5, Angular 6, Angular 7 - Compatible with Angular Material
https://github.com/owsolutions/amazing-time-picker
angular angular2 angular4 angular5 clock dialog ng-time ng-timepicker picker timepicker timepickerdialog timer
Last synced: about 1 month ago
JSON representation
Timepicker (Clock Picker) for Angular 2, Angular 4 and Angular 5, Angular 6, Angular 7 - Compatible with Angular Material
- Host: GitHub
- URL: https://github.com/owsolutions/amazing-time-picker
- Owner: owsolutions
- Created: 2017-11-29T18:43:03.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2023-07-12T14:42:59.000Z (over 1 year ago)
- Last Synced: 2024-10-09T13:42:21.487Z (about 1 month ago)
- Topics: angular, angular2, angular4, angular5, clock, dialog, ng-time, ng-timepicker, picker, timepicker, timepickerdialog, timer
- Language: HTML
- Homepage:
- Size: 3.81 MB
- Stars: 138
- Watchers: 6
- Forks: 76
- Open Issues: 74
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-angular-components - owsolutions/amazing-time-picker - Timepicker (Clock Picker) for Angular 2, Angular 4 and Angular 5, Angular 6, Angular 7 - Compatible with Angular Material (UI Components / Form)
README
# Amazing Time Picker (Clock) ![Build Status](https://travis-ci.org/owsolutions/amazing-time-picker.svg?branch=master) [![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/MIT)
## Docs and demo
You can read and learn amazing time picker and online demo here:
[https://owsolutions.github.io/amazing-time-picker
](https://owsolutions.github.io/amazing-time-picker)A visual time picker for angular 2+ projects. You can use this timepicker with Angular 2, 4, 5, 6, 7 and Angular Material. **This project doesn't require angular material or any other dependencies**
## Angular 6, 7 support since version 1.8.0
After some delay we have now support for Angular 6+. Also you can install latest version on Angular 2 project as well and it's fully backward compatible.In case required ( which shouldn't! ), install version 1.6.* for Angular 2, 4, 5 but they won't receive update.
## Live demo
[https://pixelplux.com/product/amazing-time-picker](https://owsolutions.github.io/amazing-time-picker)## Install
You need to install this repository as dependency and import it to your `app.module.ts` in `imports` section.```
npm install amazing-time-picker --save
```then, open your `app.module.ts` or other module that you want to use timepicker among, and import and add it to the `imports` section:
```
import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';
import { AmazingTimePickerModule } from 'amazing-time-picker'; // this line you need
import { AppComponent } from './app.component';@NgModule({
declarations: [
AppComponent
],
imports: [
BrowserModule,
AmazingTimePickerModule // this line you need
],
providers: [],
bootstrap: [AppComponent]
})
export class AppModule { }
```This helps your angular project to build and compile it and let you use it.
## Using in component markup
After you have installed this module, you can use it within your html templates and give the directive to the any tag. When user closes the dialog, it's gonna update the input value and will listen to input click event to open the dialog.```html
```
## Opening component programmatically
You can also open a timepicker dialog programmatically. In order to open that, you need to import the service in your component:```
import { AmazingTimePickerService } from 'amazing-time-picker';
```Then add it inside your `app.component.ts` or any other component that you want to use timepicker inside of that.
```
import { Component } from '@angular/core';
import { AmazingTimePickerService } from 'amazing-time-picker'; // this line you need@Component({
selector: 'app-root',
templateUrl: './app.component.html',
styleUrls: ['./app.component.scss']
})
export class AppComponent {
constructor( private atp: AmazingTimePickerService, // this line you need
) { }open() {
const amazingTimePicker = this.atp.open();
amazingTimePicker.afterClose().subscribe(time => {
console.log(time);
});
}
}
```Online demo
![Amazing Time Picker | TimePicker | Materialize time picker | AmazingTimepicker | ClockPicker](time-picker.jpg)
[https://owsolutions.github.io/amazing-time-picker
](https://owsolutions.github.io/amazing-time-picker)