Calendar 日历控件使用
2015-09-16 21:43
519 查看
<link rel="stylesheet" href="__STATIC__/js/calendar/calendar-blue.css"/>
<script src="__STATIC__/js/calendar/calendar.js"></script>
首先引入 calendar.js calendar-blue.css 文件 下载链接http://files.cnblogs.com/files/beyang/calendar.zip
在HTML 的body 标签下
运行一下吧
效果图如下:
如果想要在input 标签右侧出现小图标:看下面
<script src="__STATIC__/js/calendar/calendar.js"></script>
首先引入 calendar.js calendar-blue.css 文件 下载链接http://files.cnblogs.com/files/beyang/calendar.zip
在HTML 的body 标签下
<input type="text" name="time_start" id="J_time_start" class="date" size="12" > - <input type="text" name="time_end" id="J_time_end" class="date" size="12" > <script> Calendar.setup({ inputField : "J_time_start", ifFormat : "%Y-%m-%d", showsTime : false, timeFormat : "24" }); Calendar.setup({ inputField : "J_time_end", ifFormat : "%Y-%m-%d", showsTime : false, timeFormat : "24" }); $('.J_preview').preview(); //查看大图 $('.J_cate_select').cate_select({top_option:lang.all}); //分类联动 $('.J_tooltip[title]').tooltip({offset:[10, 2], effect:'slide'}).dynamic({bottom:{direction:'down', bounce:true}}); </script>
运行一下吧
<html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <title>Insert title here</title> <link rel="stylesheet" href="__STATIC__/js/calendar/calendar-blue.css"/> </head> <body> <input type="text" name="time_start" id="J_time_start" class="date" size="12" > - <input type="text" name="time_end" id="J_time_end" class="date" size="12" > <script src="__STATIC__/js/calendar/calendar.js"></script> <script> Calendar.setup({ inputField : "J_time_start", ifFormat : "%Y-%m-%d", showsTime : false, timeFormat : "24" }); Calendar.setup({ inputField : "J_time_end", ifFormat : "%Y-%m-%d", showsTime : false, timeFormat : "24" }); $('.J_preview').preview(); //查看大图 $('.J_cate_select').cate_select({top_option:lang.all}); //分类联动 $('.J_tooltip[title]').tooltip({offset:[10, 2], effect:'slide'}).dynamic({bottom:{direction:'down', bounce:true}}); </script> </body> </html>
效果图如下:
如果想要在input 标签右侧出现小图标:看下面
<html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <title>Insert title here</title> <link rel="stylesheet" href="__STATIC__/js/calendar/calendar-blue.css"/> <style type="text/css"> input.date,input.endDate{background: #fff url(__STATIC__/css/admin/bgimg/input_date.png) no-repeat right 3px; padding-right:18px;font-size:12px;} </style> </head> <body> <input type="text" name="time_start" id="J_time_start" class="date" size="12" > - <input type="text" name="time_end" id="J_time_end" class="date" size="12" > <script src="__STATIC__/js/calendar/calendar.js"></script> <script> Calendar.setup({ inputField : "J_time_start", ifFormat : "%Y-%m-%d", showsTime : false, timeFormat : "24" }); Calendar.setup({ inputField : "J_time_end", ifFormat : "%Y-%m-%d", showsTime : false, timeFormat : "24" }); $('.J_preview').preview(); //查看大图 $('.J_cate_select').cate_select({top_option:lang.all}); //分类联动 $('.J_tooltip[title]').tooltip({offset:[10, 2], effect:'slide'}).dynamic({bottom:{direction:'down', bounce:true}}); </script> </body> </html>
相关文章推荐
- 计算机器内存数量+引入和显示ARDS成员
- 搭建通过 ssh 访问的 Git 服务器
- NOIP2014 无线网络发射器选址
- python读取文件处理网页粘贴代码出现的问题
- 在IE、fixfox、chrome等浏览器中ajax提交成功后,打开新标签页面被浏览器拦截问题
- 大众点评2015笔试题(答案)
- 安卓中的几种菜单
- tp-link设置为中继模式
- Hibernate之锁机制
- IOS学习笔记1
- 谈Objective-C Block的实现
- 安卓学习之路之菜单Menu
- NOIP2014 联合权值
- 博客园kubrick主题
- 2016网易游戏 游戏研发岗 在线笔试解题报告
- CentOS7安装JDK
- poj 2420 模拟退火
- ubuntu14.04安装mysql
- 关于HTML的FORM上传文件问题
- 【转】专家:制造业将大批死亡 都怪马云