npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@wisdomgarden/calendar-creation-wg

v1.1.22

Published

vue calendar mpvue-calendar vue-calendar

Downloads

7

Readme

A feature-rich calendar component, support multiple modes and gesture sliding. For vue 3.0+

💻 Install

mpvue-calendar only support [email protected]+

npm i mpvue-calendar -S

🔨 Usage

<Calendar
  backgroundText
  class-name="select-mode"
  :remarks="remarks"
/>

import { ref } from 'vue'
import Calendar from 'mpvue-calendar'

export default {
  components: {
    Calendar,
  },
  setup() {
    const remarks = ref({'2021-1-13': 'some tings'})

    return {
      remarks,
    }
  }
}

⚙️ API

| name | type | default | description | | ------------ | ------------ | ------------ | ------------ | | selectMode | String | 'select' | For the selection mode of calendar component, can be used by 'select', 'multi','range', 'multiRange' mode | | mode | String | 'month'| Configure calendar display mode, the modes has 'month', 'week','monthRange' | | selectDate | String / String[] / {start: String; end: String} / {start: String; end: String} [] | | In different selection modes, there are use different types. String type for select mode, String[] type for multi mode, {start: String; end: String} type for range mode, and {start: String; end: String} [] type for multiRange mode. | | monthRange | String[] | | If you use monthRange mode, you need to set the content of the month to be displayed. for example [2021-1, 2021-2, 2021-6, 2021-9] | | remarks | Object | | Create remark for a day, key is date string, and value is remark content. for example { '2021-1-13': 'some things' } | | tileContent | Object | | Create tile content for a day, key is date string, and value is object, object have className and content. for example { '2021-1-5': { className: 'tip-class', content: 'some tip' } } | | holidays | Object | | Custom holiday information, for example {'2021-1-1': 'New Year'} | | completion | Boolean | false | Complete the calendar table with 6 lines | | useSwipe | Boolean | true | The mobile terminal supports gesture sliding to switch calendar | | arrowLeft | String | | Left arrow image url of toolbar | | arrowRight | String | | Right arrow image url of toolbar | | monFirst | Boolean | false | The first day of the week begins on Monday | | backgroundText | Boolean | false | Displays the background text of the current month calendar | | language | String | | use 'en' or 'cn' language | | format | (year, month) => [String, String] | | Format the date display at the header. you need return a array, the contents of the array are year and month | | weeks | String[] | | Weekly display content of custom header, for example ['S', 'M', 'T', 'W', 'T', 'F', 'S'] | | begin | String | | Set the available date of the start, and the date before it will be disabled, for example '2021-1-5' | | end | String | | Set the available date of the end, and the date after it will be disabled, for example '2021-2-5' | | disabled | String[] | | Disable certain dates , for example ['2021-1-9', '2021-2-5'] |

Chinese lunar

If you need show chinese lunar, you need import lunar module.

<Calendar
  :lunar="lunar"
/>

import lunar from 'mpvue-calendar/dist/lunar'
export default {
  ...,
  setup() {
    return {
      lunar,
    }
  }
}

⚙️ methods

| name | type | description | | ------------ | ------------ | ------------ | | onSelect | (selectDate) => void | This function is triggered when the date is selected | | onMonthChange | (year, month, day) => void | The callback is triggered when the month is change | | next | (year, month) => void | Callback this method when triggered next month | | prev | (year, month) => void | Callback this method when triggered prev month | | setToday | ref method | Back today, you need to pass the ref parameter to call the internal method |