Skip to content

Commit 6b41210

Browse files
Merge pull request #5 from MadMikeyB/master
Bump version number and style enhancements.
2 parents dffb9d2 + 61cf496 commit 6b41210

File tree

3 files changed

+21
-4
lines changed

3 files changed

+21
-4
lines changed

README.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,13 @@ export default {
150150
}
151151
````
152152

153+
### A note on markDates
154+
155+
The `markDates` and `markDatesMore` properties **must** be in JavaScript Date format, e.g, no leading zeroes on month and days.
156+
157+
✅ Correct: 2019/1/16
158+
❎ Incorrect: 2019/01/16
159+
153160
### API
154161

155162
| Attributes | Description | Whether it must pass |
@@ -171,6 +178,6 @@ For example: <FunctionalCalendar ref="Calendar"></FunctionalCalendar>
171178

172179
## Other
173180
* The following Demo.vue has a demo for reference.
174-
* If there are other issues or versions, functionally incompatible mail communication manuk.minasyan1@gmail.com
181+
* If there are other issues or versions, or functionally incompatible issues, please email manuk.minasyan1@gmail.com
175182

176183
To develop this package, I used the component vue-calendar-component.

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.2",
9+
"version": "1.3.3",
1010
"license": "ISC",
1111
"repository": {
1212
"type": "git",

src/components/FunctionalCalendar.vue

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -384,13 +384,20 @@
384384
classNames.push('wh_isMark_disabled');
385385
}
386386
387+
// Disable days of week if set in configuration
388+
let dayOfWeekString = this.fConfigs.dayNames[new Date(item.date).getDay()];
389+
390+
if (this.fConfigs.disabledDayNames.includes(dayOfWeekString)) {
391+
classNames.push('cursor-disallowed');
392+
classNames.push('wh_other_dayhide');
393+
}
394+
387395
return classNames;
388396
},
389397
clickDay: function (item) {
390398
391399
// Disable days of week if set in configuration
392-
let dayOfWeek = new Date(item.date).getDay();
393-
let dayOfWeekString = this.fConfigs.dayNames[dayOfWeek];
400+
let dayOfWeekString = this.fConfigs.dayNames[new Date(item.date).getDay()];
394401
395402
if (this.fConfigs.disabledDayNames.includes(dayOfWeekString)) {
396403
return false;
@@ -632,6 +639,9 @@
632639
this.fConfigs.isModal = this.isModal;
633640
634641
this.fConfigs.applyStylesheet = this.applyStylesheet;
642+
643+
this.fConfigs.disabledDayNames = this.disabledDayNames;
644+
this.fConfigs.disableMarkDates = this.disableMarkDates;
635645
}
636646
637647

0 commit comments

Comments
 (0)