Skip to content

Commit dfecf00

Browse files
committed
Sunday Start Functionality Fixes
1 parent 12d2224 commit dfecf00

File tree

4 files changed

+11
-9
lines changed

4 files changed

+11
-9
lines changed

package.json

Lines changed: 5 additions & 5 deletions
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": "2.1.3",
9+
"version": "2.1.4",
1010
"license": "MIT",
1111
"repository": {
1212
"type": "git",
@@ -76,15 +76,15 @@
7676
"sass-resources-loader": "^1.3.4",
7777
"stylus": "^0.54.5",
7878
"stylus-loader": "^3.0.2",
79+
"terser": "3.14.1",
7980
"thread-loader": "^1.2.0",
8081
"vue-loader": "^15.4.2",
8182
"vue-style-loader": "^4.1.2",
82-
"vue-template-compiler": "^2.5.21",
83-
"terser": "3.14.1"
83+
"vue-template-compiler": "^2.5.21"
8484
},
8585
"resolutions": {
86-
"terser": "3.14.1"
87-
},
86+
"terser": "3.14.1"
87+
},
8888
"eslintConfig": {
8989
"root": true,
9090
"env": {

src/Demo.vue

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
<template>
22
<div>
33
<functional-calendar class="demo-calendar"
4+
:sunday-start="true"
45
:change-month-function="true"
56
:change-year-function="true"
6-
:is-date-range="true"
7+
:is-date-picker="true"
78
ref="calendar"
89
></functional-calendar>
910
<button @click="preYear">Pre Year</button>

src/components/FunctionalCalendar.vue

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -250,8 +250,9 @@
250250
// Sunday Start
251251
if (this.fConfigs.sundayStart) {
252252
let dayNames = this.fConfigs.dayNames;
253+
console.log(dayNames);
253254
let sundayName = dayNames[dayNames.length - 1];
254-
255+
console.log(sundayName);
255256
dayNames.splice(dayNames.length - 1, 1);
256257
dayNames.unshift(sundayName);
257258
}
@@ -670,7 +671,7 @@
670671
}
671672
}
672673
673-
if(day.date === this.calendar.dateRange.start || day.date === this.calendar.dateRange.end){
674+
if(day.date === this.calendar.dateRange.start || day.date === this.calendar.dateRange.end || day.date === this.calendar.selectedDate){
674675
classes.push('borderd');
675676
}
676677

src/mixins/propsAndData.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ export const propsAndData = {
8888
},
8989
dayNames: {
9090
type: Array,
91-
default: () => ['Su', 'Mo', 'Tu', 'We', 'Th', 'Fr', 'Sa']
91+
default: () => ['Mo', 'Tu', 'We', 'Th', 'Fr', 'Sa', 'Su']
9292
},
9393
monthNames: {
9494
type: Array,

0 commit comments

Comments
 (0)