1.7.0 • Published 4 years ago

vue-lunar-calendar v1.7.0

Weekly downloads
10
License
ISC
Repository
github
Last release
4 years ago

npm npm npm

vue-lunar-calendar

A vue component for lunar calendar. Uses Moment.js for date operations.

  • This is the Korean lunar calendar. It is different from Chinese Lunar Calendar
  • You can also use it as a solar(gregorian) calendar

Online demo

Install

npm install vue-lunar-calendar --save

or using Yarn

yarn add vue-lunar-calendar

Usage

  1. import your project
import lunarCalendar from 'vue-lunar-calendar'
  1. Declare to component your project
Vue.component('lunar-calendar', lunarCalendar)

or

new Vue({
  components: {'lunar-calendar': lunarCalendar}
  // or components: {lunarCalendar}
})
  1. use in your project.
<template>
  <lunar-calendar
    @change="onChange"
    :firstDayOfWeek="parseInt(firstDayOfWeek)"
    :disableDaysBeforeToday="disableDaysBeforeToday"
    :defaultDate="defaultDate"
    :showLunarButton="showLunarButton"
    :cellClass="$style.cell"
  ></lunar-calendar>
</template>

<style module>
  .cell {
    background-color: #222944;
  }
</sryle>

Props

PropertyDescTypeDefault values
firstDayOfWeekSet the first day of WeekNumber0 ( sunday )
disableDaysBeforeTodayDisable days before today or notBoolean-
disabledFuncUse to decide if the day is disabled or not.Functionnull
defaultDateInit the selected dateString-
showLunarShow or hide lunarBooleanfalse
showLunarButtonShow or hide lunar check buttonBooleantrue
langLanguageString'ko'
dateLangLanguage of dateString'en'
cellSeletedClasscell seleted css classString-
customCellscustom cellsArray-

Language

AddrLanguage
koKorean
enEnglish
itItalian
cnChinese
viVietnamese
frFrench
jaJapanese

If you want to add to language, please check CONTRIBUTING.md

Event

EventDescparams
changeEmit when cell is clickedFunction

Run the project

If you want to run this project

npm run start

or using Yarn

yarn start

open user browser

http://0.0.0.0:8080/

Build

If you want to build this project

# Build the project
npm run build
# Build the demo
npm run demo

or using Yarn

# Build the project
yarn build
# Build the demo
yarn demo

Thanks for

@ClaudeSeo

1.7.0

4 years ago

1.6.1

5 years ago

1.6.0

5 years ago

1.5.5

5 years ago

1.5.4

6 years ago

1.5.3

6 years ago

1.5.2

6 years ago

1.5.1

6 years ago

1.5.0

6 years ago

1.4.2

7 years ago

1.4.1

7 years ago

1.4.0

7 years ago

1.3.0

7 years ago

1.2.1

7 years ago

1.2.0

7 years ago

1.1.1

7 years ago

1.1.0

7 years ago

1.0.8

7 years ago

1.0.7

7 years ago

1.0.6

7 years ago

1.0.5

7 years ago

1.0.4

7 years ago

1.0.3

7 years ago

1.0.2

7 years ago

1.0.1

7 years ago

1.0.0

7 years ago