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 🙏

© 2025 – Pkg Stats / Ryan Hefner

compare-date-picker

v0.4.0

Published

DatePicker Vue - based date picker plug-in

Downloads

27

Readme

DatePicker Vue - based date picker plug-in

1.Install: npm install compare-date-picker --save

2.Import global main.js

import compareDatePicker from 'compare-date-picker'
import 'compare-date-picker/dist/compareDatePicker.css'
Vue.use(compareDatePicker)

part

import compareDatePicker from 'compare-date-picker'
import 'compare-date-picker/dist/compareDatePicker.css'
components:{
    compareDatePicker
}

3.Use

1.Shortcuts

The default includes today, yesterday, the past 7 days, the past 14 days, the past 28 days, and the past 30 days, and you can customize the shortcut.

props | type |event |describe --|--|--|--| OriginQuicky|Array|cusSetQuickDate|Custom shortcut, the default shortcut will be overwritten

example:
 [
    {
        label:'the past 7 days',
        callback(picker) {
            picker.$emit('cusSetQuickDate',[new Date(new Date().setHours(0,0,0,0)).getTime()-8*24*60*60*1000,new Date(new Date().setHours(0,0,0,0)).getTime()-24*60*60*1000])
        }
    }
 ]

1.New features:Optional range can be set

props | type |default |describe --|--|--|--| disabledDate|Array| [,new Date().getTime()]| A date greater than today is not optional

The parameter is an array with a length of 2, representing the minimum and maximum values. The minimum and minimum values and those greater than the maximum values are not optional. If the minimum value is not required, the first value is null; if the maximum value is not required, the second value is null

1.Customize date range

Select the date range according to the location of the click date

2.Whether to display a comparison date

props | type |default |describe --|--|--|--| cusCompareShow|boolean| true| Whether to display a comparable function

You need to select for comparison, and then you can select the shortcut date range comparison

3.props

props | type |default |describe --|--|--|--| originDate|Array| [new Date(new Date().setHours(0,0,0,0)).getTime() - 72460601000,new Date(new Date().setHours(0,0,0,0)).getTime()]| It means start time and end time of the comparison ,can be set compareDate | Array | [] | It means start time and end time of the comparison ,cannot be set divider | Stirng | / | The dividing line between a start date and an end date weekName | Array | ["日","一","二","三","四","五","六"] |The first must be Sunday and can be changed to other week display

4.event

event | type |describe --|--|--|--| change| function|Select the function to execute after the date is completed