-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
2,946 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# EditorConfig is awesome: http://EditorConfig.org | ||
|
||
# top-most EditorConfig file | ||
root = true | ||
|
||
# Unix-style newlines with a newline ending every file | ||
[*] | ||
end_of_line = lf | ||
insert_final_newline = true | ||
|
||
# 2 space indentation | ||
[*.{coffee,html,scss,json,yml}] | ||
indent_style = space | ||
indent_size = 2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# OS X | ||
.DS_Store | ||
|
||
# bower components | ||
/bower_components/ | ||
|
||
# node modules | ||
/node_modules/ | ||
|
||
# WebStorm | ||
/.idea/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
path = require 'path' | ||
|
||
|
||
module.exports = (grunt) -> | ||
require('time-grunt') grunt | ||
require('load-grunt-tasks') grunt | ||
|
||
grunt.config.init | ||
coffee: | ||
build: | ||
files: | ||
"#{path.join('dist', 'datepicker.js')}": [ | ||
path.join 'src', '*.coffee' | ||
] | ||
sass: | ||
options: | ||
precision: 10 | ||
build: | ||
files: | ||
"#{path.join('dist', 'datepicker.css')}": [ | ||
path.join 'src', '*.scss' | ||
] | ||
|
||
grunt.registerTask 'build', [ | ||
'coffee:build' | ||
'sass:build' | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,55 @@ | ||
# angularjs-bootstrap-datepicker | ||
The Bootstrap3 datepicker for AngularJS. | ||
|
||
|
||
## Start | ||
```html | ||
<link type="text/css" rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css"/> | ||
<script type="text/javascript" src="https://code.jquery.com/jquery-2.2.4.min.js"></script> | ||
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/angular.js/1.6.10/angular.js"></script> | ||
|
||
<!-- datepicker --> | ||
<link type="text/css" rel="stylesheet" href="/bower_components/angularjs-bootstrap-datepicker/dist/datepicker.css"/> | ||
<script type="text/javascript" src="/bower_components/angularjs-bootstrap-datepicker/dist/datepicker.js"></script> | ||
``` | ||
|
||
## Example | ||
```js | ||
angular.module('your-module', ['bootstrap.datepicker']) | ||
.controller('YourController', ['$scope', function ($scope) { | ||
$scope.form = { | ||
date: null | ||
}; | ||
}]); | ||
``` | ||
|
||
```html | ||
<div class="form-group"> | ||
<label class="control-label" for="input-date">Date</label> | ||
<input ng-model="form.date" | ||
bootstrap-datepicker="{format: 'yyyy-MM-dd'}" | ||
class="form-control" | ||
id="input-date" type="text" placeholder="yyyy-MM-dd"/> | ||
</div> | ||
``` | ||
|
||
## Options | ||
```js | ||
bootstrap-datepicker = { | ||
format: 'M/d/yyyy', | ||
days: ['Su', 'Mo', 'Tu', 'We', 'Th', 'Fr', 'Sa'], | ||
months: [ | ||
'January', | ||
'February', | ||
'March', | ||
'April', | ||
'May', | ||
'June', | ||
'July', | ||
'August', | ||
'September', | ||
'October', | ||
'November', | ||
'December' | ||
] | ||
}; | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
.bootstrap-datepicker { | ||
margin: 5px 0 0; | ||
position: absolute; | ||
z-index: 1031; | ||
width: 250px; | ||
background-color: #fff; } | ||
.bootstrap-datepicker tr.pa-days { | ||
font-weight: bold; } | ||
.bootstrap-datepicker th, .bootstrap-datepicker td { | ||
cursor: pointer; | ||
text-align: center; } | ||
.bootstrap-datepicker th:hover, .bootstrap-datepicker td:hover { | ||
background: #ddd; } | ||
.bootstrap-datepicker th, .bootstrap-datepicker td { | ||
padding: 5px !important; } | ||
.bootstrap-datepicker td.selected { | ||
background: #5bc0de; } |
Oops, something went wrong.