vue-functional-calendar 2.9.5 → 2.9.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/.gitattributes CHANGED
@@ -1,3 +1,3 @@
1
- # Auto detect text files and perform LF normalization
2
- *.scss linguist-language=Vue
3
- *.css linguist-language=Vue
1
+ # Auto detect text files and perform LF normalization
2
+ *.scss linguist-language=Vue
3
+ *.css linguist-language=Vue
@@ -0,0 +1,216 @@
1
+ <p align="center"><img src="https://raw.githubusercontent.com/ManukMinasyan/vue-functional-calendar/master/public/logo.png" width="200" /></p>
2
+
3
+ <h1 align="center">Vue Functional Calendar</h1>
4
+ <p align="center">Modern calendar and datepicker module for Vue.js</p>
5
+
6
+ [![Buy us a tree](https://img.shields.io/badge/Treeware-%F0%9F%8C%B3-lightgreen?style=for-the-badge)](https://offset.earth/treeware?gift-trees)
7
+ [![Tweet](https://img.shields.io/twitter/url/http/shields.io.svg?style=social)](https://twitter.com/intent/tweet?text=Lightweight,%20high%20performance%20calendar%20component%20based%20on%20Vue.js&url=https://github.com/ManukMinasyan/vue-functional-calendar&via=github&hashtags=vue,calendar,design,developers)
8
+
9
+ [![Build Status](https://travis-ci.org/ManukMinasyan/vue-functional-calendar.svg?branch=master)](https://travis-ci.org/ManukMinasyan/vue-functional-calendar)
10
+ [![Version](https://img.shields.io/npm/v/vue-functional-calendar.svg)](https://www.npmjs.com/package/vue-functional-calendar)
11
+ [![Software License](https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat-square)](LICENSE)
12
+ [![Downloads](https://img.shields.io/npm/dt/vue-functional-calendar.svg)](https://www.npmjs.com/package/vue-functional-calendar)
13
+ ___
14
+ ## Demo
15
+
16
+ Demo: <a href="https://y3jnxov469.codesandbox.io/" target="_blank">https://y3jnxov469.codesandbox.io/</a>
17
+
18
+ [![Edit VueJS Functional Calendar Component](https://codesandbox.io/static/img/play-codesandbox.svg)](https://codesandbox.io/s/980jov4m4p?fontsize=14&hidenavigation=1)
19
+
20
+ <img src="https://raw.githubusercontent.com/ManukMinasyan/vue-functional-calendar/master/public/demo.png"/>
21
+
22
+ ___
23
+
24
+ * Lightweight, high-performance calendar component based on Vue.js
25
+ * Small memory usage, good performance, good style, and high scalability
26
+ * Native js development, no third-party library introduced
27
+ * Date Picker, Date Range, Multiple Calendars, Modal Calendar
28
+
29
+ ___
30
+
31
+ ## Browser Support
32
+ ![Chrome](https://raw.github.com/alrra/browser-logos/master/src/chrome/chrome_48x48.png) | ![Firefox](https://raw.github.com/alrra/browser-logos/master/src/firefox/firefox_48x48.png) | ![Safari](https://raw.github.com/alrra/browser-logos/master/src/safari/safari_48x48.png) | ![Opera](https://raw.github.com/alrra/browser-logos/master/src/opera/opera_48x48.png) | ![Edge](https://raw.github.com/alrra/browser-logos/master/src/edge/edge_48x48.png) | ![IE](https://raw.github.com/alrra/browser-logos/master/src/archive/internet-explorer_9-11/internet-explorer_9-11_48x48.png) |
33
+ --- | --- | --- | --- | --- | --- |
34
+ 39+ ✔ | 28+ ✔ | 10.1+ ✔ | 27+ ✔ | 15+ ✔ | Latest ✔ |
35
+
36
+ ___
37
+
38
+ ## Install
39
+
40
+ ```
41
+ npm i vue-functional-calendar --save
42
+ ```
43
+ ___
44
+
45
+ ## Usage
46
+
47
+ ### Vue.use()
48
+
49
+ ```javascript
50
+ // Introduced in vue file
51
+ import FunctionalCalendar from 'vue-functional-calendar';
52
+ Vue.use(FunctionalCalendar, {
53
+ dayNames: ['Mo', 'Tu', 'We', 'Th', 'Fr', 'Sa', 'Su']
54
+ });
55
+ ````
56
+
57
+ ### Import Component
58
+ ```javascript
59
+ // Introduced in vue file
60
+ import { FunctionalCalendar } from 'vue-functional-calendar';
61
+ ````
62
+
63
+ ### Component Settings
64
+ ````javascript
65
+ export default {
66
+ components: {
67
+ FunctionalCalendar
68
+ },
69
+ data() {
70
+ return {
71
+ calendarData: {}
72
+ }
73
+ }
74
+ }
75
+ ````
76
+
77
+ ### Template Usage
78
+ ````html
79
+ <FunctionalCalendar
80
+ // v-model="calendarData"
81
+
82
+ // v-on:changedMonth="changedMonth"
83
+ // v-on:changedYear="changedYear"
84
+
85
+ // :sundayStart="true"
86
+ // :date-format="'dd/mm/yyyy'"
87
+ // :is-date-range="true"
88
+ // :is-date-picker="true"
89
+ :...:
90
+ ></FunctionalCalendar>
91
+ ````
92
+ ___
93
+
94
+ ## Usage With Configs
95
+ ### Component Settings
96
+ ````javascript
97
+ export default {
98
+ components: {
99
+ FunctionalCalendar
100
+ },
101
+ data() {
102
+ return {
103
+ calendarData: {},
104
+ calendarConfigs: {
105
+ sundayStart: false,
106
+ dateFormat: 'dd/mm/yyyy',
107
+ isDatePicker: false,
108
+ isDateRange: false
109
+ }
110
+ }
111
+ },
112
+ }
113
+ ````
114
+
115
+ ### Template Usage
116
+ ````html
117
+ <FunctionalCalendar
118
+ // v-model="calendarData"
119
+ // :configs="calendarConfigs"
120
+ ></FunctionalCalendar>
121
+ ````
122
+ ___
123
+
124
+ ### A note on markDates
125
+ The `markedDates` property **must** be in JavaScript Date format, e.g, no leading zeroes on month and days.
126
+
127
+ ✅ Correct: 1/12/2019
128
+ ❎ Incorrect: 01/12/2019
129
+ ___
130
+
131
+ ## Available props
132
+ | Prop | Type | Default | Example | Description |
133
+ |-------------------------------|-----------------|-------------|-------------|------------------------------------------|
134
+ | sundayStart | Boolean | false | true | Week start sunday |
135
+ | newCurrentDate | Date | new Date() | new Date(2019,10,11) | Calendar Current Date |
136
+ | limits | [Object, Boolean] | false | {min: '31/10/2019', max: '31/12/2019'} | Set calendar show, and marked dates limits. |
137
+ | minSelDays | [Number, Boolean] | false | 3 | Set minimum selected days count. |
138
+ | maxSelDays | [Number, Boolean] | false | 10 | Set maximum selected days count. |
139
+ | placeholder | [String, Boolean] | false | 'yyyy/mm/dd' | Date input placeholder |
140
+ | dateFormat | String | 'dd/mm/yyyy' | 'yyyy/mm/dd' | Date formatting string |
141
+ | isDatePicker | Boolean | false | true | Enable or disable date picker |
142
+ | isMultipleDatePicker | Boolean | false | true | Enable or disable multiple date picker |
143
+ | isMultipleDateRange | Boolean | false | true | Enable or disable multiple date range |
144
+ | isDateRange | Boolean | false | true | Enable or disable date range |
145
+ | withTimePicker | Boolean | false | true | Enable or disable time picker |
146
+ | isMultiple | Boolean | false | true | Enable multiple calendar function |
147
+ | calendarsCount | Number | 1 | 3 | Count of calendars, working only is prop isMultiple |
148
+ | isSeparately | Boolean | false | true | Enable separately calendars |
149
+ | isModal | Boolean | false | true | Enable modal calendar function |
150
+ | isAutoCloseable | Boolean | false | true | Hide picker(calendar) if date has been selected |
151
+ | isTypeable | Boolean | false | true | Enable manually date typing function, working only with prop isModal |
152
+ | changeMonthFunction | Boolean | false | true | Enable changed month with list, function |
153
+ | changeYearFunction | Boolean | false | true | Enable changed year with list, function |
154
+ | changeYearStep | Number | 12 | 6 | Change year list step count |
155
+ | changeMonthStep | Number | 1 | 3 | How many months to jump forward with NextMonth() |
156
+ | markedDates | Array | [] | ['10/12/2020', '12/12/2020'] **OR** [{date: '10/1/2020', class: 'marked-class'},{date: '12/1/2020', class: 'marked-class-2'}] | Marked dates array |
157
+ | markedDateRange | Object | {start: false, end: false} | {start: '12/12/2020', end: '20/12/2020'} **OR** [{start: '12/12/2020', end: '20/12/2020'}, {start: '24/12/2020', end: '28/12/2020'}] | Marked date ranges |
158
+ | disabledDayNames | Array | [] | ['Su','We'] | Disabled Days Of Week |
159
+ | disabledDates | Array | [] | ['24/12/2020','27/12/2020'] **OR** ['beforeToday', 'afterToday', '24/12/2020','27/12/2020'] | Disabled Dates |
160
+ | enabledDates | Array | [] | ['24/12/2020','27/12/2020'] | Reversal of Disabled Dates |
161
+ | dayNames | Array | ['Mo', 'Tu', 'We', 'Th', 'Fr', 'Sa', 'Su'] | ['Monday', 'Tu', 'We', 'Th', 'Fr', 'Sa', 'Sunday'] | Week Day Names |
162
+ | monthNames | Array | ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"] | ["Jan.", "Feb.", "Mar", "Apr.", "May", "Jun.", "Jul.", "Aug.", "Sept.", "Oct.", "Nov.", "Dec."] | Month names |
163
+ | shortMonthNames | Array | ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"] | ["Jan.", "Feb.", "Mar", "Apr.", "May", "Jun.", "Jul.", "Aug.", "Sept.", "Oct.", "Nov.", "Dec."] | Short month names |
164
+ | showWeekNumbers | Boolean | false | true | Display week numbers. |
165
+ | transition | Boolean | true | false | Calendar animations |
166
+ | hiddenElements | Array | [] | ['dayNames', 'navigationArrows', 'leftAndRightDays', 'month'] | Hide calendar elements |
167
+ | titlePosition | String | center | left, right, center | Set title position |
168
+ | arrowsPosition | String | space-between | left, right, space-between | Set arrows position |
169
+ | isDark | Boolean | false | true | Dark theme |
170
+ | isLayoutExpandable | Boolean | false | true | Enable expanding the calendar layout |
171
+ | alwaysUseDefaultClasses | Boolean | false | true | Always add default classes to Day element, even when overriding with a slot |
172
+ ___
173
+
174
+ ### Slots
175
+ | Name | Description | Props |
176
+ | :------------- | :------------- | :-----------------------------------------------------------:
177
+ | Default |Default slot responsible for the day component | {week: Object, day: Object}
178
+ | datePickerInput |This slot responsible for the modal date picker input | {selectedDate: String, isTypeable: Boolean}
179
+ | dateRangeInputs |This slot responsible for the modal date range inputs | {startDate: String, endDate: String, isTypeable: Boolean}
180
+ | footer |This slot responsible for the calendar footer | {}
181
+
182
+ ### Events
183
+
184
+ | Event | Output | Description |
185
+ | :------------- | :------------- | :-----------------------------------------------------------:
186
+ | dayClicked |Object | Get clicked day object
187
+ | choseDay |Object | Get the object of the selected day
188
+ | changedMonth |Date | Month page has been changed
189
+ | changedYear |Date | Year page has been changed
190
+ | selectedDaysCount |Number | Get number of days between date range dates
191
+ | dayMouseOver |Date | Mouse over day
192
+ | opened | | The picker is opened
193
+ | closed | | The picker is closed
194
+
195
+ ##### Add the ref attribute to the calendar component and use these methods to do more.
196
+ ````javascript
197
+ For example: <FunctionalCalendar ref="Calendar"></FunctionalCalendar>
198
+
199
+ ✅ this.$refs.Calendar.PreMonth(); //Call method implementation to go to previous month
200
+ ✅ this.$refs.Calendar.NextMonth(); //Call method implementation to go to next month
201
+ ✅ this.$refs.Calendar.PreYear(); //Call method implementation to go to previous year
202
+ ✅ this.$refs.Calendar.NextYear(); //Call method implementation to go to next year
203
+ ✅ this.$refs.Calendar.ChooseDate('today'); //Call method implementation to go to today
204
+ ✅ this.$refs.Calendar.ChooseDate('25/09/2020'); //Call method implementation to go to a date
205
+ ````
206
+ ___
207
+
208
+ ## Treeware
209
+
210
+ You're free to use this package, but if it makes it to your production environment you are required to buy the world a tree.
211
+
212
+ It’s now common knowledge that one of the best tools to tackle the climate crisis and keep our temperatures from rising above 1.5C is to <a href="https://www.bbc.co.uk/news/science-environment-48870920">plant trees</a>. If you support this package and contribute to the Treeware forest you’ll be creating employment for local families and restoring wildlife habitats.
213
+
214
+ You can buy trees here [offset.earth/treeware](https://offset.earth/treeware?gift-trees)
215
+
216
+ Read more about Treeware at [treeware.earth](http://treeware.earth)
package/.prettierrc CHANGED
@@ -1,5 +1,5 @@
1
- {
2
- "semi": false,
3
- "singleQuote": true,
4
- "tabWidth": 2
5
- }
1
+ {
2
+ "semi": false,
3
+ "singleQuote": true,
4
+ "tabWidth": 2
5
+ }
package/.travis.yml CHANGED
@@ -1,6 +1,6 @@
1
- language: node_js
2
- node_js:
3
- - '10.15.3'
4
- cache:
5
- directories:
6
- - 'node_modules'
1
+ language: node_js
2
+ node_js:
3
+ - '10.15.3'
4
+ cache:
5
+ directories:
6
+ - 'node_modules'
package/LICENSE CHANGED
@@ -1,21 +1,21 @@
1
- MIT License
2
-
3
- Copyright (c) 2018 Manuk Minasyan
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.
1
+ MIT License
2
+
3
+ Copyright (c) 2018 Manuk Minasyan
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.
package/README.md CHANGED
@@ -1,222 +1,57 @@
1
- <p align="center"><img src="https://raw.githubusercontent.com/ManukMinasyan/vue-functional-calendar/master/public/logo.png" width="200" /></p>
2
-
3
- <h1 align="center">Vue Functional Calendar</h1>
4
- <p align="center">Modern calendar and datepicker module for Vue.js</p>
5
-
6
- [![Buy us a tree](https://img.shields.io/badge/Treeware-%F0%9F%8C%B3-lightgreen?style=for-the-badge)](https://offset.earth/treeware?gift-trees)
7
- [![Tweet](https://img.shields.io/twitter/url/http/shields.io.svg?style=social)](https://twitter.com/intent/tweet?text=Lightweight,%20high%20performance%20calendar%20component%20based%20on%20Vue.js&url=https://github.com/ManukMinasyan/vue-functional-calendar&via=github&hashtags=vue,calendar,design,developers)
8
-
9
- [![Build Status](https://travis-ci.org/ManukMinasyan/vue-functional-calendar.svg?branch=master)](https://travis-ci.org/ManukMinasyan/vue-functional-calendar)
10
- [![Version](https://img.shields.io/npm/v/vue-functional-calendar.svg)](https://www.npmjs.com/package/vue-functional-calendar)
11
- [![Software License](https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat-square)](LICENSE)
12
- [![Downloads](https://img.shields.io/npm/dt/vue-functional-calendar.svg)](https://www.npmjs.com/package/vue-functional-calendar)
13
- ___
14
- ## Demo
15
-
16
- Demo: <a href="https://y3jnxov469.codesandbox.io/" target="_blank">https://y3jnxov469.codesandbox.io/</a>
17
-
18
- [![Edit VueJS Functional Calendar Component](https://codesandbox.io/static/img/play-codesandbox.svg)](https://codesandbox.io/s/980jov4m4p?fontsize=14&hidenavigation=1)
19
-
20
- <img src="https://raw.githubusercontent.com/ManukMinasyan/vue-functional-calendar/master/public/demo.png"/>
21
-
22
- ___
23
-
24
- * Lightweight, high-performance calendar component based on Vue.js
25
- * Small memory usage, good performance, good style, and high scalability
26
- * Native js development, no third-party library introduced
27
- * Date Picker, Date Range, Multiple Calendars, Modal Calendar
28
-
29
- ___
30
-
31
- ## Browser Support
32
- ![Chrome](https://raw.github.com/alrra/browser-logos/master/src/chrome/chrome_48x48.png) | ![Firefox](https://raw.github.com/alrra/browser-logos/master/src/firefox/firefox_48x48.png) | ![Safari](https://raw.github.com/alrra/browser-logos/master/src/safari/safari_48x48.png) | ![Opera](https://raw.github.com/alrra/browser-logos/master/src/opera/opera_48x48.png) | ![Edge](https://raw.github.com/alrra/browser-logos/master/src/edge/edge_48x48.png) | ![IE](https://raw.github.com/alrra/browser-logos/master/src/archive/internet-explorer_9-11/internet-explorer_9-11_48x48.png) |
33
- --- | --- | --- | --- | --- | --- |
34
- 39+ ✔ | 28+ ✔ | 10.1+ ✔ | 27+ ✔ | 15+ ✔ | Latest ✔ |
35
-
36
- ___
37
-
38
- ## Install
39
-
40
- ```
41
- npm i vue-functional-calendar --save
42
- ```
43
- ___
44
-
45
- ## Usage
46
-
47
- ### Vue.use()
48
-
49
- ```javascript
50
- // Introduced in vue file
51
- import FunctionalCalendar from 'vue-functional-calendar';
52
- Vue.use(FunctionalCalendar, {
53
- dayNames: ['Mo', 'Tu', 'We', 'Th', 'Fr', 'Sa', 'Su']
54
- });
55
- ````
56
-
57
- ### Import Component
58
- ```javascript
59
- // Introduced in vue file
60
- import { FunctionalCalendar } from 'vue-functional-calendar';
61
- ````
62
-
63
- ### Component Settings
64
- ````javascript
65
- export default {
66
- components: {
67
- FunctionalCalendar
68
- },
69
- data() {
70
- return {
71
- calendarData: {}
72
- }
73
- }
74
- }
75
- ````
76
-
77
- ### Template Usage
78
- ````html
79
- <FunctionalCalendar
80
- // v-model="calendarData"
81
-
82
- // v-on:changedMonth="changedMonth"
83
- // v-on:changedYear="changedYear"
84
-
85
- // :sundayStart="true"
86
- // :date-format="'dd/mm/yyyy'"
87
- // :is-date-range="true"
88
- // :is-date-picker="true"
89
- :...:
90
- ></FunctionalCalendar>
91
- ````
92
- ___
93
-
94
- ## Usage With Configs
95
- ### Component Settings
96
- ````javascript
97
- export default {
98
- components: {
99
- FunctionalCalendar
100
- },
101
- data() {
102
- return {
103
- calendarData: {},
104
- calendarConfigs: {
105
- sundayStart: false,
106
- dateFormat: 'dd/mm/yyyy',
107
- isDatePicker: false,
108
- isDateRange: false
109
- }
110
- }
111
- },
112
- }
113
- ````
114
-
115
- ### Template Usage
116
- ````html
117
- <FunctionalCalendar
118
- // v-model="calendarData"
119
- // :configs="calendarConfigs"
120
- ></FunctionalCalendar>
121
- ````
122
- ___
123
-
124
- ### A note on markDates
125
- The `markedDates` property **must** be in JavaScript Date format, e.g, no leading zeroes on month and days.
126
-
127
- ✅ Correct: 1/12/2019
128
- ❎ Incorrect: 01/12/2019
129
- ___
130
-
131
- ## Available props
132
- | Prop | Type | Default | Example | Description |
133
- |-------------------------------|-----------------|-------------|-------------|------------------------------------------|
134
- | sundayStart | Boolean | false | true | Week start sunday |
135
- | newCurrentDate | Date | new Date() | new Date(2019,10,11) | Calendar Current Date |
136
- | limits | [Object, Boolean] | false | {min: '31/10/2019', max: '31/12/2019'} | Set calendar show, and marked dates limits. |
137
- | minSelDays | [Number, Boolean] | false | 3 | Set minimum selected days count. |
138
- | maxSelDays | [Number, Boolean] | false | 10 | Set maximum selected days count. |
139
- | placeholder | [String, Boolean] | false | 'yyyy/mm/dd' | Date input placeholder |
140
- | dateFormat | String | 'dd/mm/yyyy' | 'yyyy/mm/dd' | Date formatting string |
141
- | isDatePicker | Boolean | false | true | Enable or disable date picker |
142
- | isMultipleDatePicker | Boolean | false | true | Enable or disable multiple date picker |
143
- | isMultipleDateRange | Boolean | false | true | Enable or disable multiple date range |
144
- | isDateRange | Boolean | false | true | Enable or disable date range |
145
- | withTimePicker | Boolean | false | true | Enable or disable time picker |
146
- | isMultiple | Boolean | false | true | Enable multiple calendar function |
147
- | calendarsCount | Number | 1 | 3 | Count of calendars, working only is prop isMultiple |
148
- | isSeparately | Boolean | false | true | Enable separately calendars |
149
- | isModal | Boolean | false | true | Enable modal calendar function |
150
- | isAutoCloseable | Boolean | false | true | Hide picker(calendar) if date has been selected |
151
- | isTypeable | Boolean | false | true | Enable manually date typing function, working only with prop isModal |
152
- | changeMonthFunction | Boolean | false | true | Enable changed month with list, function |
153
- | changeYearFunction | Boolean | false | true | Enable changed year with list, function |
154
- | changeYearStep | Number | 12 | 6 | Change year list step count |
155
- | changeMonthStep | Number | 1 | 3 | How many months to jump forward with NextMonth() |
156
- | markedDates | Array | [] | ['10/12/2020', '12/12/2020'] **OR** [{date: '10/1/2020', class: 'marked-class'},{date: '12/1/2020', class: 'marked-class-2'}] | Marked dates array |
157
- | markedDateRange | Object | {start: false, end: false} | {start: '12/12/2020', end: '20/12/2020'} **OR** [{start: '12/12/2020', end: '20/12/2020'}, {start: '24/12/2020', end: '28/12/2020'}] | Marked date ranges |
158
- | disabledDayNames | Array | [] | ['Su','We'] | Disabled Days Of Week |
159
- | disabledDates | Array | [] | ['24/12/2020','27/12/2020'] **OR** ['beforeToday', 'afterToday', '24/12/2020','27/12/2020'] | Disabled Dates |
160
- | enabledDates | Array | [] | ['24/12/2020','27/12/2020'] | Reversal of Disabled Dates |
161
- | dayNames | Array | ['Mo', 'Tu', 'We', 'Th', 'Fr', 'Sa', 'Su'] | ['Monday', 'Tu', 'We', 'Th', 'Fr', 'Sa', 'Sunday'] | Week Day Names |
162
- | monthNames | Array | ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"] | ["Jan.", "Feb.", "Mar", "Apr.", "May", "Jun.", "Jul.", "Aug.", "Sept.", "Oct.", "Nov.", "Dec."] | Month names |
163
- | shortMonthNames | Array | ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"] | ["Jan.", "Feb.", "Mar", "Apr.", "May", "Jun.", "Jul.", "Aug.", "Sept.", "Oct.", "Nov.", "Dec."] | Short month names |
164
- | showWeekNumbers | Boolean | false | true | Display week numbers. |
165
- | transition | Boolean | true | false | Calendar animations |
166
- | hiddenElements | Array | [] | ['dayNames', 'navigationArrows', 'leftAndRightDays', 'month'] | Hide calendar elements |
167
- | titlePosition | String | center | left, right, center | Set title position |
168
- | arrowsPosition | String | space-between | left, right, space-between | Set arrows position |
169
- | isDark | Boolean | false | true | Dark theme |
170
- | isLayoutExpandable | Boolean | false | true | Enable expanding the calendar layout |
171
- | alwaysUseDefaultClasses | Boolean | false | true | Always add default classes to Day element, even when overriding with a slot |
172
- ___
173
-
174
- ### Slots
175
- | Name | Description | Props |
176
- | :------------- | :------------- | :-----------------------------------------------------------:
177
- | Default |Default slot responsible for the day component | {week: Object, day: Object}
178
- | datePickerInput |This slot responsible for the modal date picker input | {selectedDate: String, isTypeable: Boolean}
179
- | dateRangeInputs |This slot responsible for the modal date range inputs | {startDate: String, endDate: String, isTypeable: Boolean}
180
- | footer |This slot responsible for the calendar footer | {}
181
-
182
- ### Events
183
-
184
- | Event | Output | Description |
185
- | :------------- | :------------- | :-----------------------------------------------------------:
186
- | dayClicked |Object | Get clicked day object
187
- | choseDay |Object | Get the object of the selected day
188
- | changedMonth |Date | Month page has been changed
189
- | changedYear |Date | Year page has been changed
190
- | selectedDaysCount |Number | Get number of days between date range dates
191
- | dayMouseOver |Date | Mouse over day
192
- | opened | | The picker is opened
193
- | closed | | The picker is closed
194
-
195
- ##### Add the ref attribute to the calendar component and use these methods to do more.
196
- ````javascript
197
- For example: <FunctionalCalendar ref="Calendar"></FunctionalCalendar>
198
-
199
- ✅ this.$refs.Calendar.PreMonth(); //Call method implementation to go to previous month
200
- ✅ this.$refs.Calendar.NextMonth(); //Call method implementation to go to next month
201
- ✅ this.$refs.Calendar.PreYear(); //Call method implementation to go to previous year
202
- ✅ this.$refs.Calendar.NextYear(); //Call method implementation to go to next year
203
- ✅ this.$refs.Calendar.ChooseDate('today'); //Call method implementation to go to today
204
- ✅ this.$refs.Calendar.ChooseDate('25/09/2020'); //Call method implementation to go to a date
205
- ````
206
- ___
207
-
208
- ## Treeware
209
-
210
- You're free to use this package, but if it makes it to your production environment you are required to buy the world a tree.
211
-
212
- It’s now common knowledge that one of the best tools to tackle the climate crisis and keep our temperatures from rising above 1.5C is to <a href="https://www.bbc.co.uk/news/science-environment-48870920">plant trees</a>. If you support this package and contribute to the Treeware forest you’ll be creating employment for local families and restoring wildlife habitats.
213
-
214
- You can buy trees here [offset.earth/treeware](https://offset.earth/treeware?gift-trees)
215
-
216
- Read more about Treeware at [treeware.earth](http://treeware.earth)
217
-
218
- ## Sponsor
219
- ![Scheduling API](https://user-images.githubusercontent.com/9488406/125080407-0dd25780-e0c5-11eb-9f70-ef958968674a.png)
220
-
221
- This repo is sponsored by [**Spurwing**](https://www.spurwing.io/), where their API Makes Adding Scheduling Quick, Reliable and Scalable.
222
- Use Spurwing to build and integrate Scheduling, Booking & Calendar features in your project. Read more about Spurwing [**Scheduling API on GitHub**](https://github.com/Spurwing/Appointment-Scheduling-API).
1
+ <p align="center"><img src="https://raw.githubusercontent.com/ManukMinasyan/vue-functional-calendar/master/public/logo.png" width="200" /></p>
2
+
3
+ <h1 align="center">Vue Functional Calendar</h1>
4
+ <p align="center">Modern calendar and datepicker module for Vue.js</p>
5
+
6
+ [![Buy us a tree](https://img.shields.io/badge/Treeware-%F0%9F%8C%B3-lightgreen?style=for-the-badge)](https://offset.earth/treeware?gift-trees)
7
+ [![Tweet](https://img.shields.io/twitter/url/http/shields.io.svg?style=social)](https://twitter.com/intent/tweet?text=Lightweight,%20high%20performance%20calendar%20component%20based%20on%20Vue.js&url=https://github.com/ManukMinasyan/vue-functional-calendar&via=github&hashtags=vue,calendar,design,developers)
8
+
9
+ [![Build Status](https://travis-ci.org/ManukMinasyan/vue-functional-calendar.svg?branch=master)](https://travis-ci.org/ManukMinasyan/vue-functional-calendar)
10
+ [![Version](https://img.shields.io/npm/v/vue-functional-calendar.svg)](https://www.npmjs.com/package/vue-functional-calendar)
11
+ [![Software License](https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat-square)](LICENSE)
12
+ [![Downloads](https://img.shields.io/npm/dt/vue-functional-calendar.svg)](https://www.npmjs.com/package/vue-functional-calendar)
13
+ ___
14
+ <a href="https://y3jnxov469.codesandbox.io/" target="_blank">Demo</a>
15
+ <br>
16
+ <a href="https://github.com/ManukMinasyan/vue-functional-calendar" target="_blank">Read the documentation</a>
17
+
18
+ <img src="https://raw.githubusercontent.com/ManukMinasyan/vue-functional-calendar/master/public/demo.png"/>
19
+
20
+ ___
21
+
22
+ * Lightweight, high-performance calendar component based on Vue.js
23
+ * Small memory usage, good performance, good style, and high scalability
24
+ * Native js development, no third-party library introduced
25
+ * Date Picker, Date Range, Multiple Calendars, Modal Calendar
26
+
27
+ ___
28
+
29
+ ## Install
30
+
31
+ ```
32
+ npm i vue-functional-calendar --save
33
+ ```
34
+ ___
35
+
36
+ ## Usage
37
+
38
+ ```javascript
39
+ // Introduced in vue file
40
+ import { FunctionalCalendar } from 'vue-functional-calendar';
41
+ ````
42
+
43
+
44
+ ## Treeware
45
+
46
+ You're free to use this package, but if it makes it to your production environment you are required to buy the world a tree.
47
+
48
+ It’s now common knowledge that one of the best tools to tackle the climate crisis and keep our temperatures from rising above 1.5C is to <a href="https://www.bbc.co.uk/news/science-environment-48870920">plant trees</a>. If you support this package and contribute to the Treeware forest you’ll be creating employment for local families and restoring wildlife habitats.
49
+
50
+ You can buy trees here [offset.earth/treeware](https://offset.earth/treeware?gift-trees)
51
+
52
+ Read more about Treeware at [treeware.earth](http://treeware.earth)
53
+
54
+ ## Sponsor
55
+ ![Scheduling API](https://user-images.githubusercontent.com/9488406/125080407-0dd25780-e0c5-11eb-9f70-ef958968674a.png)
56
+
57
+ This project is sponsored by **Spurwing**, where their API Makes Adding Scheduling Quick, Reliable and Scalable. Use Spurwing to build and integrate Scheduling, Booking & Calendar features in your project. Read more about Spurwing's [**Scheduling API**](https://www.spurwing.io/).
package/babel.config.js CHANGED
@@ -1,12 +1,12 @@
1
- // babel.config.js
2
- module.exports = {
3
- presets: [
4
- "@babel/preset-env",
5
- ['@vue/app', {
6
- polyfills: [
7
- 'es6.promise',
8
- 'es6.symbol'
9
- ]
10
- }]
11
- ]
12
- }
1
+ // babel.config.js
2
+ module.exports = {
3
+ presets: [
4
+ "@babel/preset-env",
5
+ ['@vue/app', {
6
+ polyfills: [
7
+ 'es6.promise',
8
+ 'es6.symbol'
9
+ ]
10
+ }]
11
+ ]
12
+ }