Skip to content

Commit e332557

Browse files
committed
added past years
1 parent aa3426e commit e332557

15 files changed

+305
-243
lines changed

.eslintrc.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,10 @@ module.exports = {
99
'no-console': process.env.NODE_ENV === 'production' ? 'error' : 'off',
1010
'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off',
1111
'eol-last': 'error',
12+
semi: 0,
1213
},
1314
parser: 'vue-eslint-parser',
1415
parserOptions: {
1516
parser: 'babel-eslint',
1617
},
17-
};
18+
}

README.md

+11-8
Original file line numberDiff line numberDiff line change
@@ -85,14 +85,17 @@ Emits events
8585

8686
## Available props
8787

88-
| Prop | Type | Default | Description |
89-
| :---------- | :------ | :------ | :-------------------------------------------------------------------------------------------------------------------- |
90-
| days | Number | 365 | Number of days to append |
91-
| months | Number | 12 | Numbers of months to append (has precedence over `days` if custom set) |
92-
| years | Number | 0 | Number of years to append and enable year mode (see [Demo](#demo) ) |
93-
| 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) |
94-
| accentColor | String | #00008b | Set the accent color (`HEX` or `CSS color names`) |
95-
| lang | String | EN | Language (see available in [Transations](#Translation)) |
88+
| Prop | Type | Default | Description |
89+
| :------------- | :------ | :------ | :-------------------------------------------------------------------------------------------------------------------- |
90+
| days | Number | 365 | Number of days to append |
91+
| months | Number | 12 | Numbers of months to append (has precedence over `days` if custom set) |
92+
| years | Number | 0 | Number of years to append and enable year mode (see [Demo](#demo) ) |
93+
| prependedYears | Number | 0 | Number of years to preppend. **Note:** this prop is ignored if years is not set |
94+
| prepended | Number | 1 | Number of month to preppend |
95+
| pastIsDisabled | Boolean | true | Allows the selection of alreay past days and predend the days of `prepended` months |
96+
| 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) |
97+
| accentColor | String | #00008b | Set the accent color (`HEX` or `CSS color names`) |
98+
| lang | String | EN | Language (see available in [Transations](#Translation)) |
9699

97100
## Events
98101

demo/index.html

+20-9
Original file line numberDiff line numberDiff line change
@@ -2,23 +2,34 @@
22
<title>draggableCal demo</title>
33
<script src="https://unpkg.com/vue"></script>
44
<script src="../dist/draggableCal.umd.min.js"></script>
5-
<style>h1 {margin: 2.5rem 0;} </style>
5+
<style>
6+
h1 {
7+
margin: 2.5rem 0;
8+
}
9+
</style>
610

7-
<div id="app" style="width = 95%">
11+
<div id="app" style="width: 95%">
812
<h1> Classic version, all default</h1>
913
<noyear></noyear>
1014
<h1> Custom version with 18 complete months </h1>
1115
<noyearcustom :days=2 :months=18 :full-months=true accent-color="#dbde1b"></noyearcustom>
1216
<h1> With years version, with 5 years</h1>
1317
<year :years=5 accent-color="#f44336"></year>
18+
<h1> With past months version, with 11 months</h1>
19+
<pastenabled :prepended=11 :past-is-disabled=false accent-color="#8bc34a"></pastenabled>
20+
<h1> With past years version, with 3 years back and 5 to come</h1>
21+
<pastenabledyears :prependedYears=3 :years=5 :past-is-disabled=false accent-color="#372838"></pastenabledyears>
22+
1423
</div>
1524

1625
<script>
17-
new Vue({
18-
components: {
19-
noyear: draggableCal,
20-
year: draggableCal,
21-
noyearcustom: draggableCal
22-
}
23-
}).$mount('#app')
26+
new Vue({
27+
components: {
28+
noyear: draggableCal,
29+
year: draggableCal,
30+
noyearcustom: draggableCal,
31+
pastenabled: draggableCal,
32+
pastenabledyears: draggableCal,
33+
}
34+
}).$mount('#app')
2435
</script>

0 commit comments

Comments
 (0)