<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Demo</title>
<link rel="stylesheet" type="text/css" href="css/tether.min.css">
<link rel="stylesheet" type="text/css" href="css/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="css/bootstrap-datepicker3.standalone.min.css">
<link rel="stylesheet" type="text/css" href="css/ol.css">
<script src="js/jquery-3.1.1.min.js"></script>
<script src="js/tether.min.js"></script>
<script src="js/bootstrap.min.js"></script>
<script src="js/ol.js"></script>
<script src="js/layer.js"></script>
<script src="js/bootstrap-datepicker.min.js"></script>
<script src="js/bootstrap-datepicker.zh-CN.min.js"></script>
<style type="text/css">
.inputstyle{
background-color: #286090;
color: white;
height: 35px;
opacity: 0.7;
}
.specialdays{
width: 30px;
height: 30px;
-moz-border-radius: 50px;
-webkit-border-radius: 50px;
border-radius: 50px;
background-color: #F0AD4E;
}
</style>
</head>
<body>
<div class="form-group form-group-filled" id="event_period">
<input type="text" class="actual_range inputstyle" id="isTrue" value="xxxx年xx月xx日">
</div>
<script type="text/javascript">
var speciald=new Array();
speciald=["2016/12/5","2016/12/9","2016/11/6"];
$('#event_period').datepicker({
inputs: $('.actual_range'),
format:'yyyy/mm/dd',
language:'zh-CN',
endDate: Date(),
//todayBtn:'linked',
//todayHighlight:'true',
clearBtn:'true',
beforeShowDay:function(date){
var d=date;
var curr_date=d.getDate();
var curr_month=d.getMonth()+1;
var curr_year=d.getFullYear();
var formatDate=curr_year+"/"+curr_month+"/"+curr_date;
if($.inArray(formatDate,speciald)!=-1){
return {classes:'specialdays'};
}
return;
}
});
/*
var highlight=eventDates[date];
if( highlight!=-1) {
return {classes: 'shishi'};
}
else {
return [true, '', ''];
}
}
var eventDates = {};
eventDates[ new Date( '2016-11-04' )] = new Date( '2016-11-04' );
eventDates[ new Date( '2016-10-06' )] = new Date( '2016-10-06' );
eventDates[ new Date( '2016-12-07' )] = new Date( '2016-12-07' );
eventDates[ new Date( '2016-09-25' )] = new Date( '2016-09-25' );
var highlight=new Array();
highlight=eventDates[date];
if( highlight!=-1) {
return {classes: 'shishi'};
}
return;
}
*/
</script>
</body>
</html>
没有合适的资源?快使用搜索试试~ 我知道了~
bootstrap-datepicker给特殊日期添加样式
共22个文件
js:8个
css:6个
png:4个
2星 需积分: 45 46 下载量 21 浏览量
2016-12-15
11:40:12
上传
评论
收藏 260KB ZIP 举报
温馨提示
里边有配置好的文件,文件已经引入,可直接写bootstrap代码,也可以直接写bootstrap-datepicker的代码,在里面实现了给bootstrap -datepicker日历添加特殊日期,并给这些特殊日期添加样式
资源推荐
资源详情
资源评论
收起资源包目录
bootstrap-datepicker.zip (22个子文件)
bootstrap-datepicker
css
bootstrap.min.css 103KB
bootstrap-datepicker3.standalone.min.css 23KB
tether.min.css 237B
ol.css 3KB
images
bag.png 547B
icon.png 15KB
date.htm 3KB
js
skin
default
loading-2.gif 2KB
icon.png 11KB
loading-1.gif 701B
layer.css 14KB
icon-ext.png 6KB
loading-0.gif 6KB
bootstrap-datepicker.zh-CN.min.js 593B
bootstrap.min.js 44KB
jquery-3.1.1.min.js 85KB
layer.js 33KB
mobile
layer.js 3KB
need
layer.css 5KB
bootstrap-datepicker.min.js 50KB
ol.js 461KB
tether.min.js 24KB
共 22 条
- 1
资源评论
- 鑫仔8162018-07-19可用,需要有点基础
- 程序员小咖2017-08-19下载了demo以后,没效果
- qq_303898352017-12-10我擦害的评论才能下载
- candybar1125262019-07-19没效果 呵呵
niepxiya
- 粉丝: 2
- 资源: 7
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功