Skip to content

Commit 4ad953f

Browse files
committed
Readme File Fixes
1 parent e35c950 commit 4ad953f

File tree

2 files changed

+42
-41
lines changed

2 files changed

+42
-41
lines changed

README.md

Lines changed: 41 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ export default {
4545
},
4646
data() {
4747
return {
48-
calendar: {}
48+
calendarData: {}
4949
}
5050
},
5151
clickDay(data) {
@@ -56,17 +56,17 @@ export default {
5656
},
5757
clickToday(data) {
5858
console.log(data); //Jumped to this month
59+
},
60+
getSelectedDaysCount(data){
61+
console.log(data); // Get Selected Days Count
5962
}
6063
}
6164
````
6265

6366
### Template Usage
6467
````html
6568
<FunctionalCalendar
66-
// v-model="calendar"
67-
68-
// :day-names="dayNames" //dayNames=['Su','Mo','Tu','We','Th','Fr','Sa']
69-
// :month-names="monthNames" //monthNames=["January","February","March","April","May","June","July","August","September","October","November","December"]
69+
// v-model="calendarData"
7070

7171
// v-on:choseDay="clickDay"
7272
// v-on:changeMonth="changeDate"
@@ -90,6 +90,9 @@ export default {
9090
// :agoDayHide="1514937600" //Do not click before a date. Timestamp 10 digits
9191
// :futureDayHide="1525104000" //Do not click after a date Timestamp 10 digits
9292

93+
// :day-names="dayNames" //dayNames=['Su','Mo','Tu','We','Th','Fr','Sa']
94+
// :month-names="monthNames" //monthNames=["January","February","March","April","May","June","July","August","September","October","November","December"]
95+
9396
// :apply-stylesheet="true"
9497
></FunctionalCalendar>
9598
````
@@ -101,51 +104,49 @@ arr=[{date:'2018/4/1',className:"mark1"}, {date:'2018/4/13',className:"mark2"}];
101104
``````
102105

103106
## Usage With Configs
104-
### Component Settings
105-
````javascript
106-
export default {
107-
components: {
108-
FunctionalCalendar
109-
},
110-
data() {
111-
return {
112-
calendar: {
113-
configs: {
114-
sundayStart: false,
115-
isDatePicker: false,
116-
isDateRange: false,
117-
isMultiple: false,
118-
calendarsCount: 3,
119-
changeMonthFunction: false,
120-
changeYearFunction: false,
121-
markDate: ['2018/10/20','2018/10/28', '2018/10/16'],
122-
markDateMore: [{date:'2018/11/20',className:"mark1"}, {date:'2018/11/21',className:"mark2"}],
123-
agoDayHide: 0,
124-
futureDayHide: 2554387200,
125-
dayNames: ['Su', 'Mo', 'Tu', 'We', 'Th', 'Fr', 'Sa'],
126-
monthNames: ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"]
127-
isModal: false,
128-
applyStylesheet: true,
129-
}
130-
}
131-
}
132-
},
133-
}
134-
````
135107
### Template Usage
136108
````html
137109
<FunctionalCalendar
138-
// v-model="calendar"
110+
// v-model="calendarData"
139111

140-
// :configs="calendar.configs"
112+
// :configs="calendarConfigs"
141113

142114
// v-on:choseDay="clickDay"
143115
// v-on:changeMonth="changeDate"
144116
// v-on:isToday="clickToday"
145117
// v-on:selectedDaysCount="getSelectedDaysCount" // Works only with a date range.
146118
></FunctionalCalendar>
147119
````
148-
120+
### Component Settings
121+
````javascript
122+
export default {
123+
components: {
124+
FunctionalCalendar
125+
},
126+
data() {
127+
return {
128+
calendarData: {},
129+
calendarConfigs: {
130+
sundayStart: false,
131+
isDatePicker: false,
132+
isDateRange: false,
133+
isMultiple: false,
134+
calendarsCount: 3,
135+
changeMonthFunction: false,
136+
changeYearFunction: false,
137+
markDate: ['2018/10/20','2018/10/28', '2018/10/16'],
138+
markDateMore: [{date:'2018/11/20',className:"mark1"}, {date:'2018/11/21',className:"mark2"}],
139+
agoDayHide: 0,
140+
futureDayHide: 2554387200,
141+
dayNames: ['Su', 'Mo', 'Tu', 'We', 'Th', 'Fr', 'Sa'],
142+
monthNames: ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"]
143+
isModal: false,
144+
applyStylesheet: true
145+
}
146+
}
147+
},
148+
}
149+
````
149150

150151
### API
151152

@@ -154,7 +155,7 @@ arr=[{date:'2018/4/1',className:"mark1"}, {date:'2018/4/13',className:"mark2"}];
154155
| choseDay | Check the method called on a certain day to return the selected date YY-MM-DD | No |
155156
| changeMonth | Switch the method called by the month, return the date to switch to a certain month YY-MM-DD | No
156157
| isToday | When switching the month, if you cut to the current month, call this method and return to the current month today. | No
157-
| selectedDaysCount | Get number of days between date range dates |
158+
| selectedDaysCount | Get number of days between date range dates | No
158159
##### Add the ref attribute to the Calendar tab, exposing three methods to switch the month directly
159160
````javascript
160161
For example: <FunctionalCalendar ref="Calendar"></FunctionalCalendar>

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
},
77
"name": "vue-functional-calendar",
88
"description": "A style-uninstallable datepicker component for Vue.js",
9-
"version": "1.3.0",
9+
"version": "1.3.2",
1010
"license": "ISC",
1111
"repository": {
1212
"type": "git",

0 commit comments

Comments
 (0)