ciaoca / cxcalendar Goto Github PK
View Code? Open in Web Editor NEWJavaScript date picker, support range, time, year, month. JavaScript 日期选择器插件,支持范围、日期、时间、月份、年份等多种类型。
Home Page: http://ciaoca.github.io/cxCalendar/
License: MIT License
JavaScript date picker, support range, time, year, month. JavaScript 日期选择器插件,支持范围、日期、时间、月份、年份等多种类型。
Home Page: http://ciaoca.github.io/cxCalendar/
License: MIT License
how to show year and month only?
年月中文有时会乱码
建议:上传到bower仓库,便于直接bower install。
v1.5.4 的 tag 或 release 在哪?
不然不方便 npm 引用。
你好,可以设置禁用未来的日期吗
日期格式要一样 才行
var d = new Date();
d.setHours(9,0,0);
dateFirst.cxCalendar({startDate:d,type:'datetime',format:'YYYY-MM-DD HH:mm:ss'});
startDate 这个参数若只设置 时、分、秒时,
当指定的值大于当前时间则正常,否则就有异常了,正确值应该是第二天的指定时、分、秒
动态加载的数据无法绑定
在页面里点击按钮新增一行tr input name="next_date" /tr,此条为append()添加,
望指教
cxCalendar 设置data-format="YYYYMMDD" 格式后,双联动日期,第二个选择的 时间变成1970年,有大神知道为啥吗?
line 358、line 363、line368 创建的是input元素,但用了 .html(),虽然JQ不会出现啥错误,但是当给一个元素使用 .html() 参数传的是一个 undefined 变量的话,会导致后面的appendTo报错,执行不下去。
建议:
1、初始化_html 这个变量的时候 ,把它初始化为空
2、创建完input后不要跟 .html() 函数,即去掉 .html(_html)
angular jquery选择器不能使用?
当设定:type: "date",endDate:new Date()时;如,当前为5月份,
切换年份至之前的年份,例如,当前2023年,切换为2022年,
月份选择列表中的月份列表没有更新,还是2023年的1-5月,应为1-12月。
默认是click事件
obj.bind("click",fun.show);
增加focus事件, 方便使用tab
按键切换的用户.
当设定:type: "date",endDate:new Date()时;如,当前为5月份,
切换年份至之前的年份,例如,当前2023年,切换为2022年,
月份选择列表中的月份列表没有更新,还是2023年的1-5月,应为1-12月。
能提供"销毁"的api吗?谢谢
您好,请问如何让用户只能选择截止今天以前的日期呢?
就例如用户在选择生日的情况下。
unday使用后无效
当点toda 按钮的时候得考虑data-start-date 、data-end-date两个参数的值,如果不在可选范围内,today得隐藏或 return 掉,不让可点。
另外提个建议:
有时候根据业务需要,有些特殊情况,如以下场景:
1、只要选择年
2、只需要月份
3、同时需要年和月
这些是可以考虑完善一下的。谢谢!
你好,我在项目中使用了你的日期组件,使用中碰到两个问题,反馈给你。
我的项目中同时用了bootstrap,我发现两者之间有点冲突,会导致日期选择框内的内容排列错乱,修复方法如下:
.cxcalendar增加一个样式:box-sizing:content-box;
同时增加一个新的样式:
.cxcalendar *{box-sizing:content-box}
或者您可以大修一下,使其在border-box下正常显示,与bootstrap兼容。
另一个问题,我一开始用的时候发现弹出的选取框没法关闭,只能选了日期后才能关闭,在页面中其它部分点击无法关闭,而你的演示页面上不存在这个问题。找了头天才找到原因,原因是那个遮罩层太小了,而你的演示页面上为body定义了minheight来避免这个问题。这是由于你在定义遮罩层大小时用的是body的宽、高引起的,修复如下:
var docWidth = document.body.clientWidth;
var docHeight = document.body.clientHeight;
改成如下,使用窗口的宽、高:
var docWidth = document.documentElement.clientWidth;
var docHeight = document.documentElement.clientHeight;
比如我要实时修改查询结果,当我点击日期后,立刻要调用我的一个函数,我用react 的 onChange事件取监听 监听不到 源码好像是用html() 实现 这东西好像不能触发事件(具体我也没去试)
_theTime is not defined
建议:
1、在日期选择面板里增加两个按钮,一个清除按钮, 用于清除上一次选择的时间值,另一个快捷选择今天的按钮;
2、如果type值为:'datetime' 时,修改时间的交互方式不太友好,建议用select标签;
3、新增一个参数,限制不能选取周末;
4、增加一个接口,可以自定义添加哪些日期不让选择(如自定义节假日不让选择);
5、提供一个回调函数可以获取当前取值为当月和当年的第几周
希望能采纳,谢谢!
http://code.ciaoca.com/jquery/cxCalendar/demo/api
你好,
DOM页--API接口里的示例按钮:
1.点击“”设置日期值(2014.11.29)“
日历输入框显示 2014.11.29 00:00:00
2.点击“”清除日期值“”,日历输入框 为空
3.再点击日历输入框 ,打开日历选择器,
201.11.29 还存在高亮的选中状态,
如下图
想去掉它的选中状态,类似还原成初始状态。
用了其它方法解决
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.