关于bootstrap的datepicker在meteor应用中的使用(不包含bootstrap框架)
1、安装bootstrap3-datepicker包
meteor add rajit:bootstrap3-datepicker
2、使用方法
Example
In your handlebars template:
<input type="text" class="form-control" id="my-datepicker">
In client-side JS code:
Template.mytemplate.rendered=function() {
$('#my-datepicker').datepicker();
}
3、当我们点击日期控件填写日期时,bootstrap-datepicker.js帮我们动态生成了class为datepicker dropdown-menu的div,其中包括日期控件中的由年月日等构成的div,而dropdown-menu样式是在bootstrap.css中定义的,其样式为:
.input-group.date .input-group-addon i {
cursor: pointer;
width: 16px;
height: 16px;
}
.datepicker.dropdown-menu {
position: absolute;
top: 100%;
left: 0;
z-index: 1000;
float: left;
display: none;
min-width: 160px;
list-style: none;
background-color: #ffffff;
border: 1px solid #ccc;
border: 1px solid rgba(0, 0, 0, 0.2);
border-radius: 5px;
-webkit-box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
-moz-box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
-webkit-background-clip: padding-box;
-moz-background-clip: padding;
background-clip: padding-box;
*border-right-width: 2px;
*border-bottom-width: 2px;
color: #333333;
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
font-size: 13px;
line-height: 1.428571429;
}
.datepicker.dropdown-menu th, .datepicker.dropdown-menu td {
padding: 4px 5px;
}
由于没有使用bootstrap框架,因此需在应用的css文件中包含以上样式定义,其中的定义需依据使用的样式进行适配调整。
4、中文包
meteor add rajit:bootstrap3-datepicker-zh-cn
5、range用法
html:
<div class="input-daterange input-group" id="datepicker">
<input type="text" class="input-sm form-control" name="start" />
<span class="input-group-addon">to</span>
<input type="text" class="input-sm form-control" name="end" />
</div>
js:
$('#sandbox-container .input-daterange').datepicker({
language: "zh-CN",
orientation: "auto right",
autoclose: true
});
详见:http://eternicode.github.io/bootstrap-datepicker
关于bootstrap的datepicker在meteor应用中的使用(不包含bootstrap框架)的更多相关文章
- GitHub托管BootStrap资源汇总(持续更新中…)
Twitter BootStrap已经火过大江南北,对于无法依赖美工的程序员来说,这一成熟前卫的前端框架简直就一神器,轻轻松松地实现出专业的UI效果.GitHub上相关的的开源项目更是层出不穷,在此整 ...
- bootstrap的datepicker在选择日期后调用某个方法
bootstrap的datepicker在选择日期后调用某个方法 2016-11-08 15:14 1311人阅读 评论(0) 收藏 举报 首先感谢网易LOFTER博主Ivy的博客,我才顿悟了问题所在 ...
- bootstrap的datepicker使用(1.将默认的英文设置为中文2.选择日月年的时候记录之前的操作)
参考网页 bootstrap datepicker 属性设置 以及方法和事件 1.如何将bootstrap的datepicker默认的英文设置为中文 第一步,新建一个js文件(bootstrap ...
- Bootstrap历练实例:popover插件中的方法
方法 下面是一些弹出框(Popover)插件中有用的方法: 方法 描述 实例 Options: .popover(options) 向元素集合附加弹出框句柄. $().popover(options) ...
- bootstrap历练实例: 导航元素中禁用的链接
对每个 .nav class,如果添加了 .disabled class,则会创建一个灰色的链接,同时禁用了该链接的 :hover 状态, <!DOCTYPE html><html& ...
- 在Rails中最方便集成使用Bootstrap的方式
创建项目 rails new BootstrapProject 创建模型 rails g scaffold xxx --skip-stylesheets 运行迁移 rake db:migrate -- ...
- Qt Creator中,include路径包含过程(或如何找到对应的头文件)
Qt Creator中,include路径包含过程(或如何找到对应的头文件) 利用Qt Creator开发程序时,需要包含利用#include来添加头文件. 大家都知道,#include <&g ...
- 来,带你鸟瞰 Java 中4款常用的并发框架!
1. 为什么要写这篇文章 几年前 NoSQL 开始流行的时候,像其他团队一样,我们的团队也热衷于令人兴奋的新东西,并且计划替换一个应用程序的数据库. 但是,当深入实现细节时,我们想起了一位智者曾经说过 ...
- 在选择列表中无效,因为该列既不包含在聚合函数中,也不包含在 GROUP BY 子句
在选择列表中无效,因为该列既不包含在聚合函数中,也不包含在 GROUP BY 子句 突然看到这个问题,脑袋一蒙,不知道啥意思,后来想想,试图把select里的选项放到后面,问题自然解决! 下面这 ...
随机推荐
- nyoj 904 hashmap
这个题目是个水题目,现在我只管做出来,效率不考虑了. 题目链接: http://acm.nyist.net/JudgeOnline/problem.php?pid=904 我用hashmap 很爽,很 ...
- HW3.15
import java.util.Scanner; public class Solution { public static void main(String[] args) { int lotte ...
- Dynamices CRM Permission Issue (Security role UI to privilege mapping)'s solution
select * from privilege where privilegeid = 'a4736385-9763-4a64-a44b-cd5933edc631' Security role UI ...
- Codeforces Round #311 (Div. 2) D - Vitaly and Cycle(二分图染色应用)
http://www.cnblogs.com/wenruo/p/4959509.html 给一个图(不一定是连通图,无重边和自环),求练成一个长度为奇数的环最小需要加几条边,和加最少边的方案数. 很容 ...
- linux下利用openssl来实现证书的颁发(详细步骤)--转载和修改
原文地址:http://www.cnblogs.com/firtree/p/4028354.html linux下利用openssl来实现证书的颁发(详细步骤) 1.首先需要安装openssl,一个开 ...
- 冒泡排序和快速排序的java实现
转发请注明原创地址 http://www.cnblogs.com/dongxiao-yang/p/6264831.html 冒泡 public static int[] bubble_sort(int ...
- IOS开发UIImage中stretchableImageWithLeftCapWidth方法的解释
- (UIImage *)stretchableImageWithLeftCapWidth:(NSInteger)leftCapWidth topCapHeight:(NSInteger)topCap ...
- kali linux 之 DNS信息收集
[dig]命令的使用: dig是linux中的域名解析工具,功能比nslookup强很多,使用也很方便. windows系统下使用dig须下载安装一下. 使用方法: root@kali:~# dig ...
- scrollTop 值为 0
由scrollTop兼容问题引起: 在 Firefox 和 IE 中,使用 document.documentElement.scrollTop 获取: 在 Chrome 中,使用 document. ...
- SQL Server数据库PIVOT函数的使用详解(一)
http://database.51cto.com/art/201108/285250.htm SQL Server数据库中,PIVOT在帮助中这样描述滴:可以使用 PIVOT 和UNPIVOT 关系 ...