Skip to content

Commit f731d96

Browse files
committed
Fixed Few Features
1 parent 68170bf commit f731d96

File tree

4 files changed

+13
-24
lines changed

4 files changed

+13
-24
lines changed

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": "2.1.5",
9+
"version": "2.1.6",
1010
"license": "MIT",
1111
"repository": {
1212
"type": "git",

src/Demo.vue

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,15 @@
22
<div>
33
<functional-calendar class="demo-calendar"
44
:sunday-start="true"
5-
:is-modal="true"
5+
:is-modal="false"
66
:date-format="'dd.mm.yyyy'"
77
:change-month-function="true"
88
:change-year-function="true"
9-
:is-date-picker="true"
9+
:is-date-range="true"
10+
:is-multiple="true"
11+
:calendars-count="2"
1012
ref="calendar"
1113
></functional-calendar>
12-
<button @click="preYear">Pre Year</button>
13-
<button @click="nextYear">Next Year</button>
14-
<button @click="preMonth">Pre Month</button>
15-
<button @click="nextMonth">Next Month</button>
1614
<blockquote>
1715
<pre>
1816
<code>
@@ -79,7 +77,7 @@
7977
8078
.demo-calendar {
8179
margin: 80px 50px;
82-
width: 435px
80+
width: 635px
8381
}
8482
8583
pre {

src/components/FunctionalCalendar.vue

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -85,15 +85,13 @@
8585
class='c-title-anchor'
8686
:name='getTransition_()' appear>
8787
<div class="vfc-week" v-for="(week, week_key) in calendar.weeks" :key="week_key+0">
88-
8988
<div class="vfc-day" v-for="(day, day_key) in week.days" :key="day_key">
9089
<span :data-date="day.day" :key="day_key"
9190
:class="getClassNames(day)"
9291
@click="clickDay(day)"
9392
@mouseover="dateMouseOver(week_key, day.date)">
9493
</span>
9594
</div>
96-
9795
</div>
9896
</transition-group>
9997
</div>
@@ -219,8 +217,8 @@
219217
this.input.dateRange.start = val = helpCalendar.mask(val);
220218
if (helpCalendar.getDateFromFormat(val).getMonth()) {
221219
this.calendar.dateRange.start = val;
222-
this.pickYear(helpCalendar.getDateFromFormat(val).getFullYear());
223-
this.pickMonth(helpCalendar.getDateFromFormat(val).getMonth());
220+
// this.pickYear(helpCalendar.getDateFromFormat(val).getFullYear());
221+
// this.pickMonth(helpCalendar.getDateFromFormat(val).getMonth());
224222
this.markChooseDays();
225223
}
226224
}
@@ -230,8 +228,8 @@
230228
this.input.dateRange.end = val = helpCalendar.mask(val);
231229
if (helpCalendar.getDateFromFormat(val).getMonth()) {
232230
this.calendar.dateRange.end = val;
233-
this.pickYear(helpCalendar.getDateFromFormat(val).getFullYear());
234-
this.pickMonth(helpCalendar.getDateFromFormat(val).getMonth());
231+
// this.pickYear(helpCalendar.getDateFromFormat(val).getFullYear());
232+
// this.pickMonth(helpCalendar.getDateFromFormat(val).getMonth());
235233
this.markChooseDays();
236234
}
237235
}
@@ -250,9 +248,7 @@
250248
// Sunday Start
251249
if (this.fConfigs.sundayStart) {
252250
let dayNames = this.fConfigs.dayNames;
253-
console.log(dayNames);
254251
let sundayName = dayNames[dayNames.length - 1];
255-
console.log(sundayName);
256252
dayNames.splice(dayNames.length - 1, 1);
257253
dayNames.unshift(sundayName);
258254
}
@@ -382,6 +378,7 @@
382378
if (dateDay === -1) {
383379
dateDay = 6;
384380
}
381+
385382
let dayOfWeekString = this.fConfigs.dayNames[dateDay];
386383
if (this.fConfigs.disabledDayNames.includes(dayOfWeekString)) {
387384
return false;
@@ -433,7 +430,6 @@
433430
});
434431
} else if (this.fConfigs.isDatePicker) {
435432
this.calendar.selectedDate = item.date;
436-
437433
this.$emit('input', this.calendar);
438434
}
439435

src/mixins/propsAndData.js

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -146,20 +146,15 @@ export const propsAndData = {
146146

147147
applyStylesheet: true,
148148

149-
// markedDates: ['10/12/2018', '12/12/2018'], // Simple
150-
// With Custom Classes
151-
markedDates: [
152-
{date: '10/1/2019', class: 'marked-class'},
153-
{date: '12/1/2019', class: 'marked-class-2'}
154-
],
149+
markedDates: [],
155150
markedDateRange: {
156151
start: false,
157152
end: false
158153
},
159154

160155
limits: false,
161156

162-
disabledDates: ['10/12/2018'],
157+
disabledDates: [],
163158
disabledDayNames: [],
164159

165160
dayNames: [],

0 commit comments

Comments
 (0)