├── .gitignore
├── LICENSE
├── README.md
├── package.json
├── src
├── BasicInput.js
├── Datepicker.js
├── SingleInput.vue
├── WrapperInput.vue
└── index.vue
└── yarn.lock
/.gitignore:
--------------------------------------------------------------------------------
1 | node_modules
2 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | (The MIT License)
2 |
3 | Copyright (c) 2016 fundon <cfddream@gmail.com<
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Datepicker
2 |
3 | Datepicker component is based on [flatpickr](https://github.com/chmln/flatpickr) for Vue Bulma.
4 |
5 | ## Installation
6 |
7 | ```
8 | $ npm install vue-bulma-datepicker --save
9 | ```
10 |
11 | ## Examples
12 |
13 | ### Single Input
14 |
15 | ```vue
16 |
17 |
18 |
19 |
20 |
29 | ```
30 |
31 | ### Wrap Input
32 |
33 | ```vue
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
50 | ```
51 |
52 | ## Badges
53 |
54 | 
55 | 
56 |
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "vue-bulma-datepicker",
3 | "version": "1.3.6",
4 | "description": "Datepicker Component for Vue Bulma",
5 | "main": "src/index.vue",
6 | "peerDependencies": {
7 | "bulma": ">=0.2",
8 | "vue": ">=2"
9 | },
10 | "repository": "vue-bulma/datepicker",
11 | "keywords": [
12 | "vue",
13 | "bulma",
14 | "vue-bulma",
15 | "vue-bulma-component",
16 | "vue-bulma-datepicker",
17 | "datepicker"
18 | ],
19 | "author": "Fangdun Cai ",
20 | "license": "MIT",
21 | "dependencies": {
22 | "flatpickr": "2.6.3",
23 | "vue-click-outside": "1.0.6"
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/src/BasicInput.js:
--------------------------------------------------------------------------------
1 | export default {
2 | props: {
3 | placeholder: {
4 | type: String,
5 | default: 'Pick date'
6 | },
7 | inputClass: {
8 | type: [Object, Array],
9 | default: function() {
10 | return {}
11 | }
12 | },
13 | value: String
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/src/Datepicker.js:
--------------------------------------------------------------------------------
1 | // obsoleted since l10n has been moved to config object.
2 |
3 | import Flatpickr from 'flatpickr'
4 |
5 | export default class Datepicker extends Flatpickr {
6 | constructor (selector, config, l10n) {
7 | config.locale = Object.assign({}, Flatpickr.prototype.l10n, l10n)
8 | super(selector, config)
9 | }
10 | }
11 |
--------------------------------------------------------------------------------
/src/SingleInput.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
12 |
--------------------------------------------------------------------------------
/src/WrapperInput.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
19 |
--------------------------------------------------------------------------------
/src/index.vue:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
7 |
8 |
9 |
93 |
94 |
114 |
--------------------------------------------------------------------------------
/yarn.lock:
--------------------------------------------------------------------------------
1 | # THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
2 | # yarn lockfile v1
3 |
4 |
5 | flatpickr@2.6.3:
6 | version "2.6.3"
7 | resolved "https://registry.yarnpkg.com/flatpickr/-/flatpickr-2.6.3.tgz#457357532deb135f3da64b425bf4435737961564"
8 |
9 | vue-click-outside@1.0.6:
10 | version "1.0.6"
11 | resolved "https://registry.yarnpkg.com/vue-click-outside/-/vue-click-outside-1.0.6.tgz#bf3e0217210d7778299cc39ddcf89cc036089f22"
12 |
--------------------------------------------------------------------------------