8000 checkin the draft · javaDev3228/vue-datetime-picker@5ecf7a8 · GitHub
[go: up one dir, main page]

Skip to content

Commit 5ecf7a8

Browse files
committed
checkin the draft
1 parent bf0e254 commit 5ecf7a8

16 files changed

+11375
-1
lines changed

.bowerrc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"directory": "lib"
3+
}

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
/lib
2+
/coverage
3+
/node_modules

README.md

Lines changed: 148 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,149 @@
11
# vue-datetime-picker
2-
A Vue.js component implementing the date time picker using the bootstrap date time picker plugin.
2+
3+
[![Build Status](https://circleci.com/gh/Haixing-Hu/vue-datetime-picker/tree/master.svg?style=shield)](https://circleci.com/gh/Haixing-Hu/vue-datetime-picker/tree/master)
4+
[![Coverage Status](https://coveralls.io/repos/Haixing-Hu/vue-datetime-picker/badge.svg?branch=master&service=github)](https://coveralls.io/github/Haixing-Hu/vue-datetime-picker?branch=master)
5+
[![bitHound Score](https://www.bithound.io/github/Haixing-Hu/vue-datetime-picker/badges/score.svg)](https://www.bithound.io/github/Haixing-Hu/vue-datetime-picker)
6+
[![Dependency Status](https://david-dm.org/Haixing-Hu/vue-datetime-picker.svg)](https://david-dm.org/Haixing-Hu/vue-datetime-picker)
7+
[![devDependency Status](https://david-dm.org/Haixing-Hu/vue-datetime-picker/dev-status.svg)](https://david-dm.org/Haixing-Hu/vue-datetime-picker#info=devDependencies)
8+
9+
A Vue.js component implementing the datetime picker control using the [Eonasdan's bootstrap datetime picker plugin](https://github.com/Eonasdan/bootstrap-datetimepicker).
10+
11+
# Demo
12+
13+
The demo page is [HERE](http://haixing-hu.github.io/vue-datetime-picker/demo.html).
14+
15+
![Screenshot](screenshot.png)
16+
17+
# Requirements
18+
19+
- [Vue.js](https://github.com/yyx990803/vue) `^0.12.0`
20+
- [Eonasdan's bootstrap datetime picker plugin](https://github.com/Eonasdan/bootstrap-datetimepicker) `^4.17.37`
21+
22+
# Instllation
23+
24+
## npm
25+
26+
```shell
27+
$ npm install vue-datetime-picker
28+
```
29+
30+
## bower
31+
32+
```shell
33+
$ bower install vue-datetime-picker
34+
```
35+
36+
# Usage
37+
38+
The HTML snippets are as follows:
39+
40+
```html
41+
<div class="container" id="app">
42+
<vue-datetime-picker model="{{@ text}}"></vue-datetime-picker>
43+
<div style="margin-top:40px">
44+
<div> The HTML contents are as follows:</div>
45+
<hr>
46+
<div >{{{text}}}</div>
47+
</div>
48+
</div>
49+
```
50+
51+
The Javascript snippets are as follows:
52+
53+
```javascript
54+
var Vue = require("vue");
55+
56+
var vm = new Vue({
57+
el: "#app",
58+
components: {
59+
"vue-datetime-picker": require("vue-datetime-picker")
60+
},
61+
data: {
62+
text: "Hello World!"
63+
}
64+
});
65+
```
66+
67+
# Component Properties
68+
69+
## `model`
70+
71+
The model bind to the control, which must be a two way binding variable.
72+
73+
## `language`
74+
75+
The optional code of language used by the summernote plugin. Default value is `'en-US'`.
76+
Note that the language code passed to this property must be a language code together
77+
with a country code. This limitation is due to names of the i18n localizaiton files
78+
of the summernote plugin.
79+
80+
# API
81+
82+
## `control`
83+
84+
This property is a reference to the JQuery selection of the base texearea
85+
control. It could be used to call the APIs of summernote. For example,
86+
`editor.control.code(val)` will set the HTML content of the editor to the
87+
specified value, where `editor` is the reference to the `vue-datetime-picker`
88+
component.
89+
90+
# Contributing
91+
92+
- Fork it !
93+
- Create your top branch from `dev`: `git branch my-new-topic origin/dev`
94+
- Commit your changes: `git commit -am 'Add some topic'`
95+
- Push to the branch: `git push origin my-new-topic`
96+
- Submit a pull request to `dev` branch of `Haixing-Hu/vue-datetime-picker` repository !
97+
98+
# Building and Testing
99+
100+
First you should install all depended NPM packages. The NPM packages are used
101+
for building and testing this package.
102+
103+
```shell
104+
$ npm install
105+
```
106+
107+
Then install all depended bower packages. The bower packages are depended by
108+
this packages.
109+
110+
```shell
111+
$ bower install
112+
```
113+
114+
Now you can build the project.
115+
```shell
116+
$ gulp build
117+
```
118+
119+
The following command will test the project.
120+
```shell
121+
$ gulp test
122+
```
123+
124+
The following command will perform the test and generate a coverage report.
125+
```shell
126+
$ gulp test:coverage
127+
```
128+
129+
The following command will perform the test, generate a coverage report, and
130+
upload the coverage report to [coveralls.io](https://coveralls.io/).
131+
```shell
132+
$ gulp test:coveralls
133+
```
134+
135+
You can also run `bower install` and `gulp build` together with the following
136+
command:
137+
```shell
138+
npm build
139+
```
140+
141+
Or run `bower install` and `gulp test:coveralls` together with the following
142+
command:
143+
```shell
144+
npm test
145+
```
146+
147+
# License
148+
149+
[The MIT License](http://opensource.org/licenses/MIT)

bower.json

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
{
2+
"name": "vue-datetime-picker",
3+
"description": "A Vue.js component implementing the datetime picker control using the Eonasdan's bootstrap datetime picker plugin.",
4+
"version": "0.1.2",
5+
"keywords": [
6+
"Vue.js",
7+
"component",
8+
"select",
9+
"jquery.select2"
10+
],
11+
"authors": [
12+
"Haixing Hu"
13+
],
14+
"homepage": "https://github.com/Haixing-Hu/vue-datetime-picker",
15+
"license": "MIT",
16+
"repository": {
17+
"type": "git",
18+
"url": "git@github.com:Haixing-Hu/vue-datetime-picker.git"
19+
},
20+
"main": [
21+
"src/vue-datetime-picker.js"
22+
],
23+
"ignore": [
24+
"lib",
25+
"coverage",
26+
"node_modules"
27+
],
28+
"dependencies": {
29+
"vue": ">=0.12.16",
30+
"bootstrap": ">=3.3.5",
31+
"font-awesome": ">=4.2.0",
32+
"moment": ">=2.9.0",
33+
"moment-timezone": ">=0.4.0",
34+
"eonasdan-bootstrap-datetimepicker": ">=4.17.37"
35+
},
36+
"devDependencies": {
37+
}
38+
}

0 commit comments

Comments
 (0)
0