mirror of
https://github.com/tenrok/vue2-datepicker.git
synced 2026-06-24 05:40:35 +03:00
fix
This commit is contained in:
@@ -1,15 +1,15 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="calendar">
|
<div class="calendar">
|
||||||
<div class="calendar-header">
|
<div class="calendar-header" v-if="currentPanel === 'time'">
|
||||||
<a v-if="currentPanel === 'time'" @click="currentPanel = 'date'">{{now.toLocaleDateString()}}</a>
|
<a @click="currentPanel = 'date'">{{now.toLocaleDateString()}}</a>
|
||||||
<template v-else>
|
</div>
|
||||||
<a class="calendar__prev-icon" @click="changeYear(-1)">«</a>
|
<div class="calendar-header" v-else>
|
||||||
<a v-show="currentPanel === 'date'" class="calendar__prev-icon" @click="changeMonth(-1)">‹</a>
|
<a class="calendar__prev-icon" @click="changeYear(-1)">«</a>
|
||||||
<a class="calendar__next-icon" @click="changeYear(1)">»</a>
|
<a v-show="currentPanel === 'date'" class="calendar__prev-icon" @click="changeMonth(-1)">‹</a>
|
||||||
<a v-show="currentPanel === 'date'" class="calendar__next-icon" @click="changeMonth(1)">›</a>
|
<a class="calendar__next-icon" @click="changeYear(1)">»</a>
|
||||||
<a @click="showMonths">{{months[currentMonth]}}</a>
|
<a v-show="currentPanel === 'date'" class="calendar__next-icon" @click="changeMonth(1)">›</a>
|
||||||
<a @click="showYears">{{currentYear}}</a>
|
<a @click="showMonths">{{months[currentMonth]}}</a>
|
||||||
</template>
|
<a @click="showYears">{{currentYear}}</a>
|
||||||
</div>
|
</div>
|
||||||
<div class="calendar-content">
|
<div class="calendar-content">
|
||||||
<table class="calendar-table" v-show="currentPanel === 'date'">
|
<table class="calendar-table" v-show="currentPanel === 'date'">
|
||||||
|
|||||||
@@ -19,13 +19,13 @@
|
|||||||
:style="position"
|
:style="position"
|
||||||
ref="calendar"
|
ref="calendar"
|
||||||
v-show="showPopup">
|
v-show="showPopup">
|
||||||
<template v-if="!range">
|
|
||||||
<calendar-panel
|
<calendar-panel
|
||||||
v-model="currentValue"
|
v-if="!range"
|
||||||
@select="selectDate"
|
v-model="currentValue"
|
||||||
:show="showPopup"></calendar-panel>
|
@select="selectDate"
|
||||||
</template>
|
:show="showPopup"></calendar-panel>
|
||||||
<template v-else>
|
<div v-else style="overflow:hidden" >
|
||||||
<div class="datepicker-top" v-if="ranges.length">
|
<div class="datepicker-top" v-if="ranges.length">
|
||||||
<span v-for="range in ranges" @click="selectRange(range)">{{range.text}}</span>
|
<span v-for="range in ranges" @click="selectRange(range)">{{range.text}}</span>
|
||||||
</div>
|
</div>
|
||||||
@@ -39,7 +39,7 @@
|
|||||||
:start-at="currentValue[0]"
|
:start-at="currentValue[0]"
|
||||||
@select="selectDate"
|
@select="selectDate"
|
||||||
:show="showPopup"></calendar-panel>
|
:show="showPopup"></calendar-panel>
|
||||||
</template>
|
</div>
|
||||||
<div class="datepicker-footer" v-if="confirm">
|
<div class="datepicker-footer" v-if="confirm">
|
||||||
<button type="button" class="datepicker-btn datepicker-btn-confirm" @click="confirmDate"> {{ confirmText }}</button>
|
<button type="button" class="datepicker-btn datepicker-btn-confirm" @click="confirmDate"> {{ confirmText }}</button>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
+1
-1
@@ -2,7 +2,7 @@
|
|||||||
"name": "vue2-datepicker",
|
"name": "vue2-datepicker",
|
||||||
"description": "A Datepicker Component For Vue2",
|
"description": "A Datepicker Component For Vue2",
|
||||||
"main": "datepicker/index.vue",
|
"main": "datepicker/index.vue",
|
||||||
"version": "1.6.2",
|
"version": "1.6.3",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "cross-env NODE_ENV=development webpack-dev-server --open --hot",
|
"dev": "cross-env NODE_ENV=development webpack-dev-server --open --hot",
|
||||||
"build": "cross-env NODE_ENV=production webpack --progress --hide-modules"
|
"build": "cross-env NODE_ENV=production webpack --progress --hide-modules"
|
||||||
|
|||||||
Reference in New Issue
Block a user