Git Product home page Git Product logo

angular-bootstrap-datepicker's Introduction

angular-bootstrap-datepicker

AngularJS directives for the bootstrap-datepicker

At the moment, only the "Component" type is supported.


This is a fork from rbatllet/angular-bootstrap-datepicker to fix a problem with isolated scope inheritance of the ngModel.

Demo

Here's a working jsfiddle A more dynamic demo of all the options is available for the original bootstrap-datepicker.

Installation

Installation is easy, jQuery, AngularJS and Bootstrap's JS/CSS are required. You can download angular-bootstrap-datepicker via bower: bower install https://github.com/kipopov/angular-bootstrap-datepicker.git -save

When you are done downloading all the dependencies and project files the only remaining part is to add dependencies as an AngularJS module:

angular.module('myModule', ['ng-bootstrap-datepicker']);

You also need to include these files:

<link rel="stylesheet" href="bower_components/bootstrap/dist/css/bootstrap.min.css" />
<link rel="stylesheet" href="bower_components/angular-bootstrap-datepicker/dist/angular-bootstrap-datepicker.min.css" />

<script src="bower_components/jquery/dist/jquery.min.js"></script>
<script src="bower_components/bootstrap/dist/js/bootstrap.min.js"></script>
<script src="bower_components/angular/angular.min.js"></script>
<script src="bower_components/angular-bootstrap-datepicker/dist/angular-bootstrap-datepicker.min.js" charset="utf-8"></script>

Make sure you use charset="utf-8" in your script tag if your browser (or those of your users) is displaying characters wrong when using another language.

Settings

To use the directive, use the following code and compatible with Angular 1.4:

<input type="text" ng-datepicker date-options="datepickerOptions" model="date">

ng-datepicker : Indicates you want your input as a date picker.

date-options : Object of the controller scope containing the options for your date picker.

model : Variable of the controller scope to store the date. The date is currently store as a string, formatted according to the one set in date-options.

For a working example, see https://github.com/rbatllet/angular-bootstrap-datepicker/blob/master/example/demo.html

angular-bootstrap-datepicker's People

Contributors

cletourneau avatar elartix avatar iamkevla avatar kipopov avatar

Watchers

 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.