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

vue2-datepicker-updated-v2

v1.0.16

Published

A Datepicker Component For Vue2. Forked from vue2-datepicker-latest

Downloads

933

Readme

vue2-datepickers

A Datepicker Component For Vue2

Forked from vue2-datepicker

Improved Features

  • Timezone is supported. Date will be shown based on the timezone provided in props.
  • Masking is done from the format given.
  • By Default Picker will open in Current Month. This can be changed with 'defaultDate' prop.
  • Bug Fix - On user input PM string can be given for date time

Demo

image

Install

$ npm install vue2-datepicker-updated-v2 --save

Usage

<script>
import DatePicker from 'vue2-datepicker-updated-v2'

export default {
  components: { DatePicker },
  data() {
    return {
      time1: '',
      time2: '',
      shortcuts: [
        {
          text: 'Today',
          start: new Date(),
          end: new Date()
        }
      ]
    }
  }
}

</script>

<template>
  <div>
    <date-picker v-model="time1" :first-day-of-week="1"></date-picker>
    <date-picker v-model="time2" range :shortcuts="shortcuts"></date-picker>
  </div>
</template>

Attributes

| Prop | Type | Default | Description | |---------------------|---------------|-------------|-----------------------------------------------------| | type | String | 'date' | select datepicker or datetimepicker(date/datetime) | | range | Boolean | false | if true, the type is daterange or datetimerange | | format | String | yyyy-MM-dd | Date formatting string | | custom-formatter | function | null | custom Date display | | lang | String/Object | zh | Translation (en/zh/es/pt-br/fr/ru/de/it/cs)(custom) | | confirm | Boolean | false | if true, need click the button to change the value | | disabled | Boolean | false | Disable the component | | editable | Boolean | false | if true, user can type it(only the range is false) | | placeholder | String | | input placeholder text | | width | String/Number | 210 | input size | | disabled-days | Array | [] | Days in YYYY-MM-DD format to disable | | not-before | String/Date | '' | Disable all dates before new Date(not-before) | | not-after | String/Date | '' | Disable all dates after new Date(not-after) | | shortcuts | Boolean/Array | true | the shortcuts for the range picker | | time-picker-options | Object | {} | set timePickerOptions(start, step, end) | | minute-step | Number | 0 | if > 0 don't show the second picker(0 - 60) | | first-day-of-week | Number | 7 | set the first day of week (1-7) | | input-class | String | 'mx-input' | the input class name | | confirm-text | String | 'OK' | the default text to display on confirm button | | range-separator | String | '~' | the range separator text | | defaultDate | Date | new Date() | if given, then picker will open in the respective date's month. |

lang

  • String (en/zh/es/pt-br/fr/ru/de/it/cs)
  • Object
{
  days: ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'],
  months: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'],
  pickers: ['next 7 days', 'next 30 days', 'previous 7 days', 'previous 30 days'],
  placeholder: {
    date: 'Select Date',
    dateRange: 'Select Date Range'
  }
}

shortcuts

  • true - show the default shortcuts
  • false - hide the shortcuts
  • Object[] - custom shortcuts, [{text, start, end}]

| Prop | Type | Description | |-----------------|---------------|------------------------| | text | String | Text | | start | Date | Start Date | | end | Date | End Date |

time-picker-options

  • Object[] - custom time-picker, [{start, step, end}]

| Prop | Type | Description | |-----------------|---------------|------------------------| | start | String | startTime (eg '00:00') | | step | String | stepTime (eg '00:30') | | end | String | endTime (eg '23:30') |

Events

| Name | Description | Callback Arguments | |-----------------|------------------------------|------------------------| | change | When user select date | the currentValue | | confirm | When user click 'OK' button | the currentValue |

License

MIT

Copyright (c) 2017-present xiemengxiong