Skip to content

Commit

Permalink
Merge pull request #5 from MadMikeyB/master
Browse files Browse the repository at this point in the history
Bump version number and style enhancements.
  • Loading branch information
ManukMinasyan authored Dec 8, 2018
2 parents dffb9d2 + 61cf496 commit 6b41210
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 4 deletions.
9 changes: 8 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,13 @@ export default {
}
````

### A note on markDates

The `markDates` and `markDatesMore` properties **must** be in JavaScript Date format, e.g, no leading zeroes on month and days.

✅ Correct: 2019/1/16
❎ Incorrect: 2019/01/16

### API

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

## Other
* The following Demo.vue has a demo for reference.
* If there are other issues or versions, functionally incompatible mail communication [email protected]
* If there are other issues or versions, or functionally incompatible issues, please email [email protected]

To develop this package, I used the component vue-calendar-component.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
},
"name": "vue-functional-calendar",
"description": "A style-uninstallable datepicker component for Vue.js",
"version": "1.3.2",
"version": "1.3.3",
"license": "ISC",
"repository": {
"type": "git",
Expand Down
14 changes: 12 additions & 2 deletions src/components/FunctionalCalendar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -384,13 +384,20 @@
classNames.push('wh_isMark_disabled');
}
// Disable days of week if set in configuration
let dayOfWeekString = this.fConfigs.dayNames[new Date(item.date).getDay()];
if (this.fConfigs.disabledDayNames.includes(dayOfWeekString)) {
classNames.push('cursor-disallowed');
classNames.push('wh_other_dayhide');
}
return classNames;
},
clickDay: function (item) {
// Disable days of week if set in configuration
let dayOfWeek = new Date(item.date).getDay();
let dayOfWeekString = this.fConfigs.dayNames[dayOfWeek];
let dayOfWeekString = this.fConfigs.dayNames[new Date(item.date).getDay()];
if (this.fConfigs.disabledDayNames.includes(dayOfWeekString)) {
return false;
Expand Down Expand Up @@ -632,6 +639,9 @@
this.fConfigs.isModal = this.isModal;
this.fConfigs.applyStylesheet = this.applyStylesheet;
this.fConfigs.disabledDayNames = this.disabledDayNames;
this.fConfigs.disableMarkDates = this.disableMarkDates;
}
Expand Down

0 comments on commit 6b41210

Please sign in to comment.