li-guang / angular-bootstrap3-datepicker-wicture

改进angular-bootstrap3-datepicker,并添加时间选择的支持

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

angular-bootstrap3-datepicker

A AngularJS directives for the django-bootstrap3-datetimepicker

Installation

Installation is easy, jQuery, momentjs, font-awesome, AngularJS and Bootstrap's JS/CSS are required. You can download angular-bootstrap-datepicker via bower: bower install angular-bootstrap3-datepicker

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-bootstrap3-datepicker']);

You also need to include these files:

<link rel="stylesheet" href="bootstrap/css/bootstrap.css" />
<link rel="stylesheet" href="ng-bs3-datepicker.css" />
<link rel="stylesheet" href="font-awesome.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" date-format="YYYY-MM-DD">

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.

date-format: Format to use to format the date.(参阅moment.js。另:如果存在dd则有Date选择;如果有hh则有Time选择,此基础上有ss则会显示秒,否则显示小时与分钟)

language: moment locale文件的区域名称,如"zh-cn"

Thanks to

About

改进angular-bootstrap3-datepicker,并添加时间选择的支持

License:Apache License 2.0


Languages

Language:JavaScript 100.0%