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-idatepicker

v1.0.0

Published

Vue.js datepicker inspired by iOS datepicker

Downloads

3

Readme

Vue-idatepicker

Vue datepicker component. Compatible with Vue 2.x

Requirements

Example

Screenshot

Usage

<template>
  <datepicker :date="date" :required="true" :readonly="false" @datechange="doSomething">
    <i class="my-icon" />
  </datepicker>
</template>

<script>
import Datepicker from 'vue-idatepicker'

export default {
  components: {
    Datepicker
  },
  data () {
    return {
      datepickerOptions: {
        emptyDay: 'Day',
        emptyMonth: 'Month',
        emptyYear: 'Year',
        clear: 'Clear date',
        months: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'],
        startDate: new Date(1950, 5, 5),
        finishDate: new Date (2050, 5, 5),
        styles: {
          pickerWidth: '90%',
          pickerShadow: '3px 4px 18px 0px rgba(115, 115, 115, 0.6)',
          clearColor: 'blue',
          selectedBackground: 'blue',
          selectedColor: 'white',
          disabledColor: 'gray',
          placeholderColor: 'gray',
          textColor: 'black'
        }
      }
    }
  },
  methods: {
    doSomething (err, date) {
      if (err) {
        // your validation messages
      } else {
        // do something with date
      }
    }
  }
})
</script>

Available props

| Prop | Type | Default | Description | |-----------------------------------|--------------|----------------------|-----------------------------------------------------------------------| | date | Number | | Date value in seconds elapsed since 1 January 1970 00:00:00 UTC | | readonly | Boolean | | Do not show picker, date only | | required | Boolean | false | To show asterisk | | options | Object | | Datepicker options | | options.emptyDay | String | 'day' | Translation for day | | options.emptyMonth | String | 'month' | Translation for month | | options.emptyYear | String | 'year' | Translation for year | | options.clear | String | 'clear' | Translation for clear button | | options.months | Array | | Translation for month names | | options.startDate | Date | new Date(1897, 0, 1) | Min date | | options.finishDate | Date | new Date() | Max date | | options.styles | Object | | Styles for some inner parts | | options.styles.pickerWidth | String | '100%' | Width of picker | | options.styles.pickerShadow | String | null | Shadow of picker | | options.styles.clearColor | String | '#358ed7' | Color of clear button | | options.styles.selectedBackground | String | '#358ed7' | Background color of selected item | | options.styles.selectedColor | String | '#fff' | Color of selected item | | options.styles.disabledColor | String | 'gray' | Color of disabled item | | options.styles.placeholderColor | String | 'gray' | Color of stub elements | | options.styles.textColor | String | '#1b212b' | Color of other text |

Available events

| Event | Output | Description | |---------------|-------------------------|---------------------------------------------------------------| | datechange | Object/null, Date/null | Emits on outside click with two arguments - error and result. |

Error Object

error = {
  day: Boolean,
  month: Boolean,
  year: Boolean
}

Slots

There is one default slot, where you can place icons, validations or any additional html

License

The MIT License