Closed hasyrails closed 4 years ago
$ yarn add vue-material-design-icons
<template>
- <button @click="prevMonth">前の月</button>
+ <ChevronLeft @click="prevMonth"></ChevronLeft>
- <button @click="nextMonth">次の月</button>
+ <ChevronRight @click="nextMonth"></ChevronRight>
</tamplate>
<script>
import ChevronLeft from 'vue-material-design-icons/ChevronLeft.vue';
import ChevronRight from 'vue-material-design-icons/ChevronRight.vue';
components: {
ChevronLeft,
ChevronRight
},
</script>
nextMonth() {
- this.currentDate = moment(this.currentDate).add(1, "month");
+ this.currentDate = moment(this.currentDate).add(1, "month").format('YYYY/MM');
this.getCalendar();
},
prevMonth() {
- this.currentDate = moment(this.currentDate).subtract(1, "month");
+ this.currentDate = moment(this.currentDate).subtract(1, "month").format('YYYY/MM');
this.getCalendar();
},
カレンダーヘッダーを
< 2020/9 >
横並びにしたい CSSの基本!横並びなどフレキシブルに対応する「Flexボックス」
カレンダーの日付の部分は
text-align :center;
では中央に寄らない ブロックや画像を中央寄せする
<ChevronLeft fillColor="white" @click="prevMonth"></ChevronLeft>
現状
実装点