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

vue-draggable-cal-ptbr

v2.6.0-2

Published

A datepicker Vue component. Compatible with Vue 2.x

Downloads

7

Readme

DraggableCal

A datepicker Vue component. Compatible with Vue 2.x

Demo

To view a demo online: demo

To view demo examples locally clone the repo and run npm i && npm serve --open App.vue

gif

What the future holds

I am planning to add a few more customizations props in the near future, but I don't let my lack of imagination/creativity stop yours ! I strongly encourage you ton open Issues or pull requests if you have any ideas/needs that you'd like to see added to the component !

  • [ ] Add more languages
  • [ ] Add props for easy custom styling
  • [x] ~~Add the possibility to append years as well~~
  • [ ] Optimize the Array of days rendered

Install

npm i vue-draggable-cal --save

or

yarn add vue-draggable-cal
import DraggableCal from 'vue-draggable-cal';

export default {
  // ...
  components: {
    DraggableCal,
  },
  // ...
};

Or use directly from a CDN

<div id="app">
  <DraggableCal></DraggableCal>
</div>
<script src="https://unpkg.com/vue"></script>
<script src="https://unpkg.com/vue-draggable-cal"></script>
<script>
new Vue({
  el: '#app',
  components: {
    DraggableCal,
  }
})
</script>

Usage

<draggable-cal></draggable-cal>

<!-- OR -->

<DraggableCal></DraggableCal>

Emits events

<DraggableCal @selectedDate="doSomething($event)"></DraggableCal>

Available props

| Prop | Type | Default | Description | | :-------------- | :------ | :------ | :-------------------------------------------------------------------------------------------------------------------- | | days | Number | 365 | Number of days to append | | months | Number | 12 | Numbers of months to append (has precedence over days if custom set) | | years | Number | 0 | Number of years to append and enable year mode (see Demo ) | | prependedYears | Number | 0 | Number of years to preppend. Note: this prop is ignored if years is not set | | prependedMonths | Number | 1 | Number of month to preppend | | disabledWeekDays| Object | {} | Disable a specific week day by setting it's day number to true. ie. {0: true} will disable sundays | | disabledDates | Array | [] | Disable a specific date. Format of the day should be a string YYYY-MM-DD ie. ['2018-01-01'] | | pastIsDisabled | Boolean | true | Allows the selection of alreay past days and predend the days of prepended months | | fullMonths | Boolean | false | Weither or not to always use complete months (i.e. days=1 if set to true the whole month is going to be appended) | | accentColor | String | #00008b | Set the accent color (HEX or CSS color names) | | lang | String | EN | Language (see available in Transations) |

Events

These events are emitted on actions in the datepicker

| Event | Output | Description | | :----------- | :----- | :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | selectedDate | Object | A date has been selected. It outputs an object : formatedDate: String of the date andraw: An array of [YYYY, MM, DD] that can be used to build the date object via Date.UTC(YYYY,MM,DD) | | dateCleared | null | The previously selected date has been unselected by the user |

Available languages

| Abbr | Language | | | ------ | -------- | --------- | | EN | English | | | FR | French | | | PT_BR | Portuguese (BR) | Default |

Dev & Build

Dev server

  yarn serve # Or npm run serve

Build App

  yarn build # Or npm run build

Build Lib

  yarn bundle # Or npm run bundle

License

MIT

Thanks

Credits to @webAngelo for his range-calendar from which this is highly inspired.