Home  >  Article  >  Backend Development  >  datetimepicker怎么让它显示年视图啊

datetimepicker怎么让它显示年视图啊

WBOY
WBOYOriginal
2016-06-23 13:38:361232browse

http://www.bootcss.com/p/bootstrap-datetimepicker/
里面有个年视图,求各位大神指点下改怎么写


回复讨论(解决方案)

$(".form_datetime").datetimepicker({format: 'yyyy-mm',autoclose: true,startView:3,minView:3,todayHighlight:true});


这是我根据他提供的参数做的设置,但是有点小问题,高亮显示不是当前月份

刚我没说清楚,我要的是类似 的,而不是文本框里只显示年月

。。。。。。。。汗,那你自己修改一下属性就可以啦,看文档,他对每个属性都有详解的,改成你想要的就OK啦

能给个文档的链接不,我没有找到这个文档

观察了一下它提供的示例代码,当 startView 为 3 时,即便 todayHighlight 为真 也不会高亮当前月
必须点击 todayBtn 按钮后才会高亮当前月。而其他的状态没有问题

这应该是他的一个bug

我能说文档就是你给的地址吗

太感谢了,我疏忽了

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn