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

@codekraft-studio/vue-calendar

v0.0.1

Published

> A fully customizable versatile calendar with events support

Downloads

9

Readme

vue-calendar

A fully customizable versatile calendar with events support

NPM version Dependency Status

This project is still in development so api and features might change.

Installation

Download the project using your favourite package manager:

npm i @codekraft-studio/vue-calendar
yarn add @codekraft-studio/vue-calendar

Import it in your project and install it in your application:

import Vue from 'vue'

// component and styles
import '@codekraft-studio/vue-calendar/dist/VueCalendar.css'
import VueCalendar from '@codekraft-studio/vue-calendar'

Vue.use(VueCalendar, options)

It's all ready, you can use the <VueCalendar /> component.

<body id="app">
  <VueCalendar />
</body>

Customization

The calendar is very flexible and allow for sections customization using named slots or full section replacements.

For example if you want to place a image above the calendar header you can do it like this:

<VueCalendar>
  <div slot="header-top">
    <img src="path/to/img" />
  </div>
</VueCalendar>

If you use the section name as the slot name, it will fully replace the section letting you fully customize the output:

<VueCalendar>
  <div slot="header" slot-scope="slotProps">
    <div class="my-header-top"></div>
    <div class="my-header-content">
      <!-- your custom toolbar -->
    </div>
    <div class="my-header-bottom"></div>
  </div>
</VueCalendar>

Right now you can only customize the calendar header and footer, below the list of the slot names:

header

The header is where the calendar toolbar is usually located, it exposes two child slots for upper and lower content placement.

  • header-top
  • header-bottom

footer

The footer is usually used to put arbitrary text, it exposes two child slots for upper and lower content placement.

  • footer-top
  • footer-bottom

Methods

The calendar is built on top of momentjs so it's very easy to control the dates and the calendar itself exposes few methods to change the date view and move around the calendar:

prev(unit, len=1)

Change the date to the next unit updating the calendar. By default it will add or remove only one unit, the second parameter is to choose how far to move previous.

this.$refs.Calendar.prev('m')
this.$refs.Calendar.prev('month', 2)

next(unit, len=1)

Change the date to the next unit updating the calendar. By default it will add or remove only one unit, the second parameter is to choose how far to move next.

this.$refs.Calendar.next('y')
this.$refs.Calendar.next('year', 2)

setDate(date)

This method update the calendar current date, it will trigger a calendar view change if the date is not inside the current sliced view, it accepts what momentjs accepts as a valid date, so a string, object and more.. checkout momentjs documentation to know more about it.

this.$refs.Calendar.setDate() // default to now
this.$refs.Calendar.setDate(new Date())
this.$refs.Calendar.setDate('tomorrow')
this.$refs.Calendar.setDate('09-08-2018')
this.$refs.Calendar.setDate('09-08-2018', 'MM-DD-YYYY')
this.$refs.Calendar.setDate('09/08/2018', 'MM/DD/YYYY')

The arguments are forwarded to momentjs parse function, checkout all the valid formats.


Development

Clone the project repository and install all the dependencies than start the vuecli development server:

npm install
npm run serve

License

This package is under the MIT License.