Skip to content

Commit 4b06939

Browse files
committed
added years + color custom
1 parent 73ec44e commit 4b06939

11 files changed

+426
-413
lines changed

README.md

+12-9
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,12 @@ To view demo examples locally clone the repo and run `npm i && npm serve --open
1818

1919
## What the future holds
2020

21-
I am planning to add a few more customizations props in the near future, but I don't let my lack of imagination/creativity stop yours ! I strongly encourage you ton open Issues or pull requests if you have any ideas/needs that you'd like to see added to the component !
21+
I am planning to add a few more customizations props in the near future, but I don't let my lack of imagination/creativity stop yours ! I strongly encourage you ton open Issues or pull requests if you have any ideas/needs that you'd like to see added to the component !
2222

2323
- [ ] Add more languages
2424
- [ ] Add props for easy custom styling
2525
- [ ] Add the possibility to append years as well
26-
- [ ] Optimize the Array of days rendered
26+
- [ ] Optimize the Array of days rendered
2727

2828
## Install
2929

@@ -56,7 +56,7 @@ Or use directly from a CDN
5656
<DraggableCal />
5757
</div>
5858
<script src="https://unpkg.com/vue"></script>
59-
<script src="https://unpkg.com/vue-draggable-call"></script>
59+
<script src="https://unpkg.com/vue-draggable-cal"></script>
6060
<script>
6161
new Vue({
6262
el: '#app',
@@ -81,12 +81,14 @@ Emits events
8181

8282
## Available props
8383

84-
| Prop | Type | Default | Description |
85-
| :--------- | :------ | :------ | :-------------------------------------------------------------------------------------------------------------------- |
86-
| days | Number | 365 | Number of days to append |
87-
| months | Number | 12 | Numbers of months to append (has precedence over `days` if custom set) |
88-
| lang | String | EN | Language (see available in [Transations](#Translation)) | |
89-
| fullMonths | Boolean | false | Weither or not to always use complete months (i.e. `days=1` if set to `true` the whole month is going to be appended) |
84+
| Prop | Type | Default | Description |
85+
| :---------- | :------ | :------ | :-------------------------------------------------------------------------------------------------------------------- |
86+
| days | Number | 365 | Number of days to append |
87+
| months | Number | 12 | Numbers of months to append (has precedence over `days` if custom set) |
88+
| years | Number | 0 | Number of years to append and enable year mode |
89+
| fullMonths | Boolean | false | Weither or not to always use complete months (i.e. `days=1` if set to `true` the whole month is going to be appended) |
90+
| accentColor | String | #00008b | Set the accent color (`HEX` or `CSS color names`) |
91+
| lang | String | EN | Language (see available in [Transations](#Translation)) |
9092

9193
## Events
9294

@@ -105,6 +107,7 @@ These events are emitted on actions in the datepicker
105107
| FR | French | |
106108

107109
## License
110+
108111
MIT
109112

110113
## Thanks

demo/demo.html

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
<meta charset="utf-8">
2+
<title>draggableCal demo</title>
3+
<script src="https://unpkg.com/vue"></script>
4+
<script src="../dist/draggableCal.umd.min.js"></script>
5+
6+
<div id="app">
7+
<h1> Classic version, all default</h1>
8+
<noyear></noyear>
9+
<h1> Custom version with 18 complete months </h1>
10+
<noyearcustom :days=2 :months=18 :fullMonths=true></noyearcustom>
11+
<h1> With years version, with 5 years</h1>
12+
<year :years=5></year>
13+
</div>
14+
15+
<script>
16+
new Vue({
17+
components: {
18+
noyear: draggableCal,
19+
year: draggableCal,
20+
noyearcustom: draggableCal
21+
}
22+
}).$mount('#app')
23+
</script>

dist/draggableCal.common.js

+144-165
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/draggableCal.common.js.map

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/draggableCal.umd.js

+144-165
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/draggableCal.umd.js.map

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/draggableCal.umd.min.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/draggableCal.umd.min.js.map

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "vue-draggable-cal",
3-
"version": "1.2.0",
3+
"version": "2.0.0",
44
"main": "dist/draggableCal.common.js",
55
"module": "dist/draggableCal.esm.js",
66
"unpkg": "dist/draggableCal.umd.js",

0 commit comments

Comments
 (0)