Coder Social home page Coder Social logo

vue-calendar's Introduction

vue-calendar's People

Contributors

eellkk avatar jinzhe avatar qcy1121 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

vue-calendar's Issues

日期选择bug

@jinzhe
复现步骤: 选择日期如2016年10月31日 然后切换至其他月份日期如11月11日 console中报错Uncaught TypeError: Cannot read property '0' of undefined(…)

经简单测试 有10月31日 10月30日 7月31日 7月30日等日期会报错

livedemo亦可复现

本地如何重现?

我想在本地重现 gif 效果,但始终跑不起来。希望能给予指导或更详细的 demo

本地可以预览了,但出现样式问题。

上月的最后一天计算有误?

calendar.vue Line 84:

lastDayOfLastMonth = m == 0 ? new Date(y - 1, 11, 0).getDate() : new Date(y, m, 0).getDate();//最后一月的最后一天

实际上这样就可以了

var lastDayOfLastMonth = new Date(y, m, 0).getDate();

组件咋用到 自己项目中 ...

老铁们, 你们都是怎么用的 啊, 我是把calendar.js, 和calendar.vue copy 到项目里去了, 再把 calendar 引入到我要用的地方 然后 他就报template or render function not defined , 请问 我这样用 有毛病 吗 ? 在线等......

大牛,你这插件要怎么使用呢?

import VueCalendar from 'vue-calendar' Vue.use(VueCalendar);
这样把插件引用进来会报错,还有你的demo里面按组件的方式引入在vue2.0会不兼容,求大神指点
export default { components:{ calendar },

日历选择范围

设置开始时间跟结束时间 假如我开始时间是5号 但是结束时间能选择当天的时间

run dev 报错

vue-calendar $ npm run dev

[email protected] dev /Users/lixia/Desktop/vue-calendar
node build/dev-server.js

Starting dev server...
events.js:160
throw er; // Unhandled 'error' event
^

Error: listen EACCES 0.0.0.0:666
at Object.exports._errnoException (util.js:1026:11)
at exports._exceptionWithHostPort (util.js:1049:20)
at Server._listen2 (net.js:1244:19)
at listen (net.js:1293:10)
at Server.listen (net.js:1389:5)
at EventEmitter.listen (/Users/lixia/Desktop/vue-calendar/node_modules/express/lib/application.js:618:24)
at Object. (/Users/lixia/Desktop/vue-calendar/build/dev-server.js:82:18)
at Module._compile (module.js:570:32)
at Object.Module._extensions..js (module.js:579:10)
at Module.load (module.js:487:32)
at tryModuleLoad (module.js:446:12)
at Function.Module._load (module.js:438:3)
at Module.runMain (module.js:604:10)
at run (bootstrap_node.js:394:7)
at startup (bootstrap_node.js:149:9)
at bootstrap_node.js:509:3

npm ERR! Darwin 15.5.0
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "run" "dev"
npm ERR! node v6.9.1
npm ERR! npm v3.10.8
npm ERR! code ELIFECYCLE
npm ERR! [email protected] dev: node build/dev-server.js
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] dev script 'node build/dev-server.js'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the vue-calendar package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node build/dev-server.js
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs vue-calendar
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls vue-calendar
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR! /Users/lixia/Desktop/vue-calendar/npm-debug.log

这个错误是什么情况呢?

这个错误不影响正常适用,但是挺让人忧伤的。。。

Chrome控制台报错如下

[Vue warn]: Prop "sep" expects a two-way binding type. (found in component: <calendar>)

vue template

<input class="calendar-input" size="20" id="createDate" type="text" @click.stop="openCalendar($event,'picker2')" v-model="calendar.items.picker2.value" placeholder="选择时间">
            <calendar
              :show.sync="calendar.show"
              :type="calendar.type"
              :value.sync="calendar.value"
              :x="calendar.x"
              :y="calendar.y"
              :begin.sync="calendar.begin"
              :end.sync="calendar.end"
              :range.sync="calendar.range"
              :weeks="calendar.weeks"
              :months="calendar.months"
              :sep="calendar.sep">
            </calendar>

JS

<script type="text/ecmascript-6">
import calendar from '../../../dashborader/calendar/calendar';

export default{
    data() {
       calendar:{
          show:false,
          x:0,
          y:0,
          picker:"",
          type:"date",
          value:"",
          begin:"",
          end:"",
          value:"",
          sep:"/",
          weeks:[],
          months:[],
          range:false,
          items:{
            // 2个日期模式
            picker2:{
              type:"date",
              value:"",
              range:true,
              sep:"-"
            }
          }
        },
      watch:{
          'calendar.value': function (value) {
              this.calendar.items[this.calendar.picker].value=value
         }
      },
    methods: {
        // 打开显示选择器
        openCalendar(e,type) {
           // 设置类型
           this.calendar.picker=type
           this.calendar.type=this.calendar.items[type].type
           this.calendar.range=this.calendar.items[type].range
           this.calendar.begin=this.calendar.items[type].begin
           this.calendar.end=this.calendar.items[type].end
           this.calendar.value=this.calendar.items[type].value
           // 可不用写
           this.calendar.sep=this.calendar.items[type].sep
           this.calendar.weeks=this.calendar.items[type].weeks
           this.calendar.months=this.calendar.items[type].months

           this.calendar.show=true
           this.calendar.x=e.target.offsetLeft
           this.calendar.y=e.target.offsetTop+e.target.offsetHeight+8
         }
       },
      components: {
           calendar
      }
    }
}
</script>

样式问题

我觉得你应该在 style 加上 scoped 来保证样式是内链的,这样子不会被class这些覆盖。

可以直接 <script> 引入吗?

项目种种原因,需要使用传统多页面,但是直接 <script> 引入Vue,现在看到您的日历控件非常棒,想要使用,但是不知如何直接 <script> 引入?

请问大神,是否可以在当前月份跨月选择?Choose Date over month

目前日期控件使用完美,但产品方面提出,在当前月可以选择临近月份的时间,而不是只能选择当前月,不知是否有属性可以做到?

if i was in September, i cannot pick the date of August, only if i change the month to August.So my question is can i pick date over the month, not disable the other month's date

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.