Giter Club home page Giter Club logo

angular-bootstrap3-datepicker's Introduction

angular-bootstrap3-datepicker

An AngularJS datetimepicker based on benzen's bootstrap3-datetimepicker

Installation

Installation is easy, jQuery, momentjs, font-awesome, AngularJS and Bootstrap's JS/CSS are required. You can download angular-bootstrap3-datepicker via bower: bower install ng-bootstrap3-datepicker --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('myApp', ['ng-bs3-datepicker']);

You also need to include these files:

<link rel="stylesheet" href="bootstrap/css/bootstrap.css" />
<link rel="stylesheet" href="font-awesome.css" />
<link rel="stylesheet" href="ng-bs3-datepicker.css" />


<script src="jquery.js"></script>
<script src="bootstrap/js/bootstrap.js"></script>
<script src="angular.js"></script>
<script src="moment.js"></script>
<script src="moment-your-locale.js"></script>
<script src="ng-bs3-datepicker.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 :

<ng-bs3-datepicker ng-model="date" language="zh-cn" date-format="YYYY-MM" min-viewmode="months" max-date="moment().format()" min-date="moment({y: 2000})" pick-date="true" pick-time="false"/>

datepicker : Indicates you want a date picker

ng-model : Variable of the controller scope to store the date. The date is currently store as a string, formatted according to date format.

language : The locale you want to use for this date picker. To work, this require adding the corresponding momentjs locale file.

date-format: Format to use to format the date. The correct definition can be found here

Optional properties are as follows:

min-viewmode : "minViewMode" of BootStrap datetimepicker.

max-date : "maxDate" of BootStrap datetimepicker.

min-date : "minDate" of BootStrap datetimepicker.

pick-date : "pickDate" of BootStrap datetimepicker.

pick-time : "pickTime" of BootStrap datetimepicker.

Thanks to

angular-bootstrap3-datepicker's People

Contributors

qswy929 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.