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-component-datepicker

v1.0.2

Published

calendar base on vuejs

Downloads

14

Readme

vue-component-calendar

Dependencies Dev Dependencies

Example using vue-loader with Webpack.

相关操作

# demo
双击打开`example/browser.html`

# serve with hot reload at localhost:8080 => 开发
npm run dev

# build for production with minification => 打包编译
npm run build

# prepub
gulp prepub

# publish
gulp publish

For detailed explanation on how things work, read the docs for vue-laoder.

rem说明:

1rem = 100px(iPhone5)
1rem = 117.18px(iPhone6)

使用方式

<body>
    <div class="content">
        <button @click.prevent="showCalendar=true">唤醒日历</button>
        <calendar
            :show-calendar.sync="showCalendar"
            max-date="4m"
            start-date="2016-01-23"
            end-date="2016-01-25"
            :is-double-check.sync=true
            :is-vication.sync=true></calendar>
    </div>
    <script type="text/javascript">
        var ef = new Vue({
            el: '.content',
            data: {
                showCalendar: false,
                result: null
            },
            components: {
                "calendar": vueComCalendar
            },
            events: {
                'vue-calendar-confirm': function(result) {
                    //do whatever you want.
                    console.log(result)
                },
                'vue-calendar-cancle': function(result) {
                    //do nothing
                }
            }
        });
    </script>
</body>

API

展示相关
  • max-date="4m" or max-date="90d"

    • 设置月份的时候,默认到最后一个月的最后一天是可选状态

    • 设置天数的时候,默认到天数的最后一天可选,之前和之后都不可选

  • :is-vication.sync=true

    • 是否显示假期及假日
操作相关
  • start-date="2016-01-23"

    • 设置日历默认选中的开始日期,此时默认是支持入住和离店 双选
    • 插件会自动滚动到开始日期
  • end-date="2016-01-25"

    • 设置日历默认选中的离店日期
    • 注意:如果设置是单选,但是设置了开始和结束时间是只选中开始时间
  • :is-double-check.sync=true

    • 日历是单选还是双选,文案不同,效果也不同
    • 如果是多选,但是只选择了一个日期,这时候点击完成会有错误提示
      { status: -1 , msg:"you need selected two dates." }
  • 'events' Method

    • vue-calendar-confirm
      • 点击完成时,会触发该事件,同时回传日期选中结果
    • vue-calendar-cancle
      • 点击backdrop区域的时候,会触发该事件,此时会关闭日历,但也同时回传当前的选中日期结果,但是这时候一般不会对数据做处理,当做取消操作。

##相关截图 ./screenshot/demo.png