Git Product home page Git Product logo

tangsy / vue3-hash-calendar Goto Github PK

View Code? Open in Web Editor NEW
80.0 80.0 16.0 928 KB

基于vue3的移动端日期、时间选择插件(支持农历/节假日),日期选择面板以日历形式展示。支持单选、多选、范围选择模式;上下滑动切换周/月模式。支持快速切换年份和月份。支持两种模式:1,月模式,左右滑动切换月份。2、周模式,左右滑动切换周。

Home Page: https://calendar.hxkj.vip

License: MIT License

JavaScript 16.38% TypeScript 69.89% Vue 9.56% Shell 0.07% Less 4.09%
calendar date-picke datetime-picker mobile-calendar time-picker vue vue-calendar vue3 week-picker year-picker

vue3-hash-calendar's Introduction

Hi, welcome to my Github 👋

vue3-hash-calendar's People

Contributors

tangsy 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

Watchers

 avatar  avatar

vue3-hash-calendar's Issues

显示农历时,solar2lunar中月份为何要加一呢?

如下所示,其中的月份单独加一了。好像是calendar的月份是从0开始的?
PS: 我是用的lunar-typescript的库。
const showLunar = (date) => {
if (!date || !date.day) return;

const lunarObj = lunar.solar2lunar(date.year, date.month + 1, date.day);

return lunarObj.festival || lunarObj.lunarFestival || lunarObj.IDayCn;
};
感谢!

可以设置自定义几行么?

比如只展示 4 行;还有每次左右滑动的时候,如何得知当前的时间范围,因为我要根据时间范围请求接口获取对应的日程

兼容性问题

image
image
new Date()只有年月时,在火狐浏览器会有兼容性问题

范围选择 可以不传默认选中时间吗

使用range 这个范围组件的时候 不加默认时间 日期传入会错乱 而且有时候 不需要有默认选择范围
image
不知道开发大大可否修改一下 只想要范围选择这个功能

建议组件expose一下当前的时间

发现slot操作栏的时候是不暴露日期数据的,然后如果要自己改头部只能通过左右切换的回调配合当前是月还是周来增减判断。
但是发现周月在频繁切换和修改时会有bug,导致时间算错。
看了一下代码并没有expose当前年月:currentYearMonth。这个感觉对于大多数人还是很有用的一个数据。
目前只能通过放开action,然后操作时获取dom节点来准确判断了🤣

好的用户体验

我点击日期的时候他能自动切换到时间,这样用户体验不是很好吗?用户都可以不用点击上面的时间去切换了

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.