All Projects → hiyali → ng-data-picker

hiyali / ng-data-picker

Licence: MIT license
🏄🏼 A data picker based on Angular 4+ (like native datetime picker of iOS)

Programming Languages

typescript
32286 projects
HTML
75241 projects
CSS
56736 projects
javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to ng-data-picker

Ng2 Smart Table
Angular Smart Data Table component
Stars: ✭ 1,590 (+6525%)
Mutual labels:  angular2, ng2, angular4
Ngautocomplete
Light-weight autocomplete component for Angular.
Stars: ✭ 52 (+116.67%)
Mutual labels:  angular2, ng2, angular4
angular2-cookie-law
Angular2+ component that provides a banner to inform users about cookie law
Stars: ✭ 38 (+58.33%)
Mutual labels:  angular2, ng2, angular4
Ngx Daterangepicker Material
Pure Angular 2+ date range picker with material design theme, a demo here:
Stars: ✭ 169 (+604.17%)
Mutual labels:  angular2, angular4, picker
Amazing Time Picker
Timepicker (Clock Picker) for Angular 2, Angular 4 and Angular 5, Angular 6, Angular 7 - Compatible with Angular Material
Stars: ✭ 142 (+491.67%)
Mutual labels:  angular2, angular4, picker
Ng2 Search Filter
Angular 2 / Angular 4 / Angular 5 custom pipe npm module to make a search filter on any input, 🔥 100K+ downloads
Stars: ✭ 137 (+470.83%)
Mutual labels:  angular2, ng2, angular4
Angular2 Carousel
An lightweight , touchable and responsive library to create a carousel for angular 2 / 4 / 5
Stars: ✭ 26 (+8.33%)
Mutual labels:  angular2, ng2, angular4
angular2-signature-pad
Signature pad component for Angular 2.x and above.
Stars: ✭ 17 (-29.17%)
Mutual labels:  angular2, ng2, angular4
Angular Google Maps
Angular 2+ Google Maps Components
Stars: ✭ 1,982 (+8158.33%)
Mutual labels:  angular2, ng2, angular4
Truly Ui
Truly-UI - Web Angular UI Components for Desktop Applications (Electron, NW, APP JS)
Stars: ✭ 195 (+712.5%)
Mutual labels:  angular2, ng2, angular4
Ng Drag Drop
Drag & Drop for Angular - based on HTML5 with no external dependencies. 🎉
Stars: ✭ 233 (+870.83%)
Mutual labels:  angular2, angular4
Angular5 Seed
Angular5 Seed for Application
Stars: ✭ 222 (+825%)
Mutual labels:  angular2, angular4
Ngx File Drop
Angular 11 file and folder drop library
Stars: ✭ 220 (+816.67%)
Mutual labels:  angular2, angular4
Ngx Facebook
Angular TypeScript Wrapper for Facebook SDK
Stars: ✭ 214 (+791.67%)
Mutual labels:  angular2, angular4
jquery-datepicker
A full-featured datepicker jquery plugin
Stars: ✭ 35 (+45.83%)
Mutual labels:  datetime, picker
Ng Select
⭐ Native angular select component
Stars: ✭ 2,781 (+11487.5%)
Mutual labels:  angular2, angular4
react-calendar-datetime-picker
A simple and fast date and time picker component for React
Stars: ✭ 58 (+141.67%)
Mutual labels:  datetime, picker
vue-timeselector
🕒 Simply customizable powerful time picker for Vue.js
Stars: ✭ 41 (+70.83%)
Mutual labels:  datetime, picker
Angular Moment Picker
Angular Moment Picker is an AngularJS directive for date and time picker using Moment.js.
Stars: ✭ 536 (+2133.33%)
Mutual labels:  datetime, picker
Angular4 Docker Example
Efficiently Dockerized Angular CLI example app
Stars: ✭ 212 (+783.33%)
Mutual labels:  angular2, angular4

No time for maintenance - welcome to send a useful PR :)

ng-data-picker Version Badge

🏄🏾 A Data Picker for Angular 4+

npm package travis build NPM downloads gzip size CircleCI

NPM Description

Let's more easily select some data on the touch screen device, such as time / city / gender / seat number / product / ...

Examples

See branch gh-pages for all code of extant examples and environment.

Demo Level Code
gender gender.component.ts
product ★★ product.component.ts
date-time ★★★ date-time.component.ts

Take a look

Screen shot

⚠️ Below gif is a temporary used from vue version of this picker. will be updated soon.

Screen record

Install

yarn add ng-data-picker

or

npm i -S ng-data-picker

Usage

Quick look

app.module.ts

import { NgModule, NO_ERRORS_SCHEMA } from '@angular/core'
import { DataPickerComponent } from 'ng-data-picker'

@NgModule({
  ...
  declarations: [
    DataPickerComponent
  ],
  schemas: [
    NO_ERRORS_SCHEMA // for third party component
  ],
  ...
})

app.component.ts

export class AppComponent {
  data = [
    {
      list: ['sun', 'earth', 'moon']
    }
  ]

  change ({ gIndex, iIndex }) {
    console.log(gIndex, iIndex)
  }
}

app.component.html

<ng-data-picker [data]="data" (change)="change($event)"></ng-data-picker>

⚙️ Props

name type default explain
change Function ({gIndex,iIndex})=>{} Callback after which group's current index changed, pass two arguments, group index gIndex and item index iIndex
data Array [] Picker initial data
data[i].currentIndex Number 0 Current index of this group's list
data[i].weight Number 1 Group weights in parent width 1..12
data[i].list Array - List of the group
data[i].list[j] String or Object - Item in the list of group, use value key when it is a object item
data[i].onClick Function - Click event on the middle layer of this group, pass two arguments that group index gIndex and selected index iIndex of this group
data[i].textAlign String - start center end justify left right nowrap wrap
data[i].className String - Your custom class name for this group
data[i].divider Boolean false If it is true, then onClick list currentIndex will not be used
data[i].text String - Just use this text when divider is true

🔨 Instance methods

name type explain
setGroupData Function (gIndex,gData)=>void Dynamically set a group data with two arguments (gIndex, gData), group index and group data (see props data[i])
getCurrentIndexList Function ()=>[] Return a Array of the groups current index list (has divider current index, and it is default to 0)
getGroupsRectList Function ()=>void Get some info for gesture, you can call this function when the component displayed if the component is hidden when it's initialization

Development

npm start # development
npm run build:prod # build for production
npm run prepare # build for third party

Any problem?

Please let me know.

Is it useful?

🌚 Donate A github star ⍟

License

MIT

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].