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

@tillhub/vue-date-picker

v2.5.2

Published

Extended Vue date picker based on Element-UI.

Downloads

76

Readme

@tillhub/vue-date-picker CircleCI

A date picker that allows user to select a range, quick pick dates, and select custom ranges

Install

npm install --save @tillhub/vue-date-picker

Demo

npm run serve

Usage

<template>
  <vue-date-picker
    locale="de"
    tintColor="#357ebd"
    buttonLabel="All Time"
    buttonWidth="auto"
    :hideDateInButton="false"
    :showTime="false"
    :initCustomToggle="true"
    @get-dates="printTheDate"/>
</template>

<script>

import VueDatePicker from '@tillhub/vue-date-picker'
import '@tillhub/vue-date-picker/dist/vue-date-picker.css'

export default {
  name: 'App',
  components: {
    VueDatePicker
  },
  methods: {
    printTheDate(selected){
      console.log("I gots the dates! ", selected)
    }
  },
}
</script>

Properties

The components accepts optional properties.

| Property | type | required | example | default | description | |:-------------------- |:--------|:---------|:-----------------------------------------------------------|:----------|:------------------------------------------------------------------------------------ | | locale | string | no | "de" or "en" | "en" | Currently only German and English is supported. Only 'de' and 'en ' | | tint-color | string | no | "#50e3c1" | "#357ebd" | This allows customized color of the highlighted date range on the calender | | placement | string | no | right | bottom | The side of the button that the date picker will open from | | button-label | string | no | "All Time" | "Select" | Customized Button Label to override default | | button-width | string | no | "100px" | "auto" | Overrides the button width, but default it adjust to content | | date-type | string | no | "iso" or "date" | "date" | Formats the get-dates (start/end) to either date format or ISO string format | | date-format | string | no | "yyyy-MM-dd" | none | A valid date-fns token to format the dates instead of defaulting to the native toLocaleDateString. For the list of tokens see: https://date-fns.org/v2.9.0/docs/format |
| :hide-date-in-button | boolean | no | true | false | Overrides the applied date being showed in place of Button label | | :show-time | boolean | no | false | true | Overrides the time being shown next to the date | | :init=custom-toggle | boolean | no | false | true | Activates or de-activate Custom toggle at the bottom on initial open | | :simple | boolean | no | true | false | This will only have the date-range calender select options | | :clearable | boolean | no | true | false | An X icon will appear on the button that will clear date and return {} on @get-dates | | :date-range | object | no | { start: new Date(), end: "2018-11-13T23:00:00.000Z", showDateText: true } | true | Allows the date-range to be past in. The object must include a 'start' and 'end' key with a date value or an ISO sting. 'showDateText' (optional) must be a boolean and will over ride the button label and message above the calender to be the date range. It defaults to false | | :default-short-cut | string | no | "thisMonth" | false | A valid shortcut string that matched with the existing date shortcuts, i.e. today, thisWeek, thisMonth, etc. |

Event

The Date picker with only return the selected date from the component when the Applied button is clicked. It will return an object { start: new Date(), end: new Date()} with a start and an end key. The dates will be in a javascript date object see https://www.w3schools.com/js/js_dates.asp.

| Event | type | example | default | description | |:-----------|:--------|:---------------------|:--------|:------------------------------------------------------------------------------------------------------------------------------| | @get-dates | function | (selected dates)=>{} | n/a | Passes the selected dates when the applied button is clicked and will return an object { start: new Date(), end: new Date(), showDateText: true} | | @clear | function | ()=>{} | n/a | When 'clearable' props is true, this event emits when the clear x is clicked |

License

MIT © jmy-kellogg