Git Product home page Git Product logo

datepicker-ionic2's Introduction

How to use

1) Install using npm

    npm i datepicker-ionic2 --save

2) Add it to your ngModule in app.module

 import { DatePickerModule } from 'datepicker-ionic2';
   imports: [
        IonicModule.forRoot(App),
        DatePickerModule,
    ],

3) Use the directive ion-datepicker in your html

	   <button full="true" [min]="now" calendar="true" [(ngModel)]="date"  ion-item  ion-datepicker>
      <ion-label>
        Results<ion-icon name="forward-arrow"></ion-icon>
      </ion-label>
      <div item-content>
        {{date | date}}
      </div>
    </button>

a) [(ngModel)] is used to have the value as any other angular2 component

a) [min] is minimum date that user is allowed to select. (not required)

b) [max] is maximum date that user is allowed to select. (not required)

c) (ionChanged) is an event emitter that returns the date as a $event.

d) [hclasses] is a bridge to the header classes of the directive using ngClass (string, array or object) (not required)

e) [dclasses] is a bridge to the date classes of the directive using ngClass (string, array or object) (not required)

f) [full] - a boolean that determines whether the modal should be full screen or not (not required)

g) [calendar] - a boolean that makes the date picker display as a calendar

e) [modalOptions] - a modal is used to display the picker to configure the animation or other options you may use this

4) Pictures

datepicker-ionic2's People

Contributors

celsomarques avatar misha130 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.