Giter Club home page Giter Club logo

angular-date-picker's Introduction

Angular Datepicker

jQuery less datepicker for angularjs.

Angular datepicker is a light weight datepicker under 1K with only dependencies to PikaDay and momentJs

Dependencies

  1. MomentJs 11.6K minified and gzip
  2. PikaDay 5K minified and gzip

Install

bower install angular-pikaday-picker

Setting up

Make sure you have include moment js and pikaday both on your page before you include angular date picker.

<script type="text/javascript" src="bower_components/moment/min/moment.min.js"></script>
<script type="text/javascript" src="bower_components/pikaday/pikaday.js"></script>	

<script type="text/javascript" src="bower_components/angular-date-picker/angular-date-picker.min.js"></script>	

Your module

var app = angular.module('yourApp',['angular.datepicker']);

Your html

<input type="text" ng-model="from_date" picka-day />

That's all you need for minimal setup.

Options

Format

<input type="text" ng-model="from_date" picka-day format="MM-D-YYYY" />

Deafult Date

<input type="text" ng-model="from_date" picka-day default-date="2015-02-11" />

Disable Weekends

<input type="text" ng-model="from_date" picka-day disable-weekends=true />

Min Date

<input type="text" ng-model="from_date" picka-day min-date="2015-02-10" />

Max Date

<input type="text" ng-model="from_date" picka-day max-date="2015-02-20" />

Events

You have also add hooks on different events

on Select

<input type="text" ng-model="from_date" picka-day on-select="someMethod" />

on Close

<input type="text" ng-model="from_date" picka-day on-close="someMethod" />

on Open

<input type="text" ng-model="from_date" picka-day on-open="someMethod" />

on Draw

<input type="text" ng-model="from_date" picka-day on-draw="someMethod" />

angular-date-picker's People

Contributors

thetutlage avatar

Stargazers

 avatar

Watchers

 avatar ymrs avatar  avatar

Forkers

angulardevmrs

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.