php日程提醒,php日程控件
日历控件,可以在此基础上做更多的扩展,如实现行程安排等
日历控件
.rili {
margin: 30px 0px;
overflow: hidden;
text-align: center;
color: #666
}
.low_calendar {
overflow: hidden;
border: 1px solid #c8d2dc;
}
.low_calendar h1 {
width: 100%;
background: #ff6f7e;
font-size: 14px;
height: 30px;
line-height: 30px;
text-align: center;
color: #fff;
font-weight: 100;
box-shadow: 1px 1px 1px rgba(0, 0, 0, 0.1);
-webkit-box-shadow: 1px 1px 1px rgba(0, 0, 0, 0.1);
-moz-box-shadow: 1px 1px 1px rgba(0, 0, 0, 0.1);
position: relative
}
.calGrid table {
width: 100%;
border-collapse: collapse;
margin: 0;
padding: 0;
}
.calGrid table th {
background-color: #fff;
border-left: 1px solid #whiteSmoke;
font-size: 12px;
height: 30px;
line-height: 30px;
text-align: center;
vertical-align: middle;
color: #999;
color: #505050;
border-bottom: 1px solid #C8C8C8;
}
.calGrid table td {
width: 12%;
height: 40px;
line-height: 40px;
font-size: 16px;
font-weight: 700 text-align : center;
color: #4A5056;
border-bottom: 1px solid #C8C8C8;
border-left: 1px solid #ccc;
position: relative;
overflow: hidden;
cursor: pointer;
text-align: center;
}
.calGrid table td img {
position: absolute;
left: 0;
top: 0;
display: none
}
.calGrid table td.curr img {
display: block
}
.calGrid table td.disable {
color: #ED5565;
}
.calGrid table td:first-child {
border-left: none;
}
.calGrid table tr:last-child td {
border-bottom: none;
}
.calGrid table td.holiday {
font-size: 12px;
}
.calGrid table th.week_day, .calGrid table td.week_day {
color: #ED5565
}
.calGrid table td.curr {
line-height: 25px;
font-size: 13px;
color: #fff;
background: #ff6f7e;
-moz-box-shadow: 2px #7d92a7 inset;
-webkit-box-shadow: 2px #7d92a7 inset;
box-shadow: 2px #7d92a7 dcdeeb;
}
.calGrid table td.curr span {
display: block;
font-size: 12px;
line-height: 10px;
}
.low_calendar h1 .ldate {
width: 25px;
height: 25px;
background: url(images/ldate.png) no-repeat;
float: left;
position: absolute;
top: 2px;
left: 10px;
overflow: hidden;
text-indent: -99999px
}
.low_calendar h1 .rdate {
width: 25px;
height: 25px;
background: url(images/rdate.png) no-repeat;
float: right;
position: absolute;
top: 2px;
right: 10px;
overflow: hidden;
text-indent: -99999px
}
/**
* User: yuluo
* Date: 2015-05-08
* Time: 下午3:08
* Desc:实现生成指定月份的日历信息 在此基础上可以无限遐想和扩展...
*/
date_default_timezone_set("Asia/Shanghai");
$time_now = time(); //strtotime("2015-02-04");
if($_REQUEST["date"]){
$time_now = strtotime($_REQUEST["date"]);
}
function getCurMonthFirstDay($date)
{
return date('Y-m-01', strtotime($date));
}
function getCurMonthLastDay($date)
{
return date('Y-m-d', strtotime(date('Y-m-01', strtotime($date)) . ' +1 month -1 day'));
}
$current_y = date("Y", $time_now);
$current_m = date("m", $time_now);
$next_m = date('Ymd', strtotime(date('Y-m-01', $time_now) . ' +1 month'));
$pre_m = date('Ymd', strtotime(date('Y-m-01', $time_now) . ' -1 month'));
?>
上一月<?php echo($current_y); ?>年<?php echo($current_m); ?>月下一月
周日 | 周一 | 周二 | 周三 | 周四 | 周五 | 周六 |
---|
//$time_now = strtotime("2015-05-11");
$str_time_now = date("Y-m-d", $time_now); 字符串格式的当前时间
$current_month_first_day = getCurMonthFirstDay($str_time_now); /当前月的第一天
$current_month_first_w_val = intval(date("w", strtotime($current_month_first_day))); //当前月第一天是一周的第几天 周日(0)是第一天
$current_month_last_day = getCurMonthLastDay($str_time_now); 当前月的最后一天
$current_week_val = date("w", $time_now);
$current_day_val = date("j", $time_now);
$last_day_val = date("j", strtotime($current_month_last_day)); 当前月最后一天的天索引
$strart_time = false;
$int_day_val = 1;
$ctrl_step = $last_day_val + $current_month_first_w_val; 控件结束的位置索引
for ($i = 0; $i < 42; $i++) {
if($i == 0){ ?>
if ($i == $current_month_first_w_val) {
$strart_time = true;
}
if ($i >= $ctrl_step) {
$strart_time = false;
}
if ($strart_time) {
$tem_current_date = date("Y-m-d",strtotime(date("Y-m", $time_now).("-").strval($int_day_val)));
$str_td_class = "";
if (($i%7)==0 || (($i + 1) % 7) == 0){
$str_td_class = "week_day";
}
?>
<?php echo($int_day_val); ?>
$int_day_val++;
} else {
?>
}
if ((($i + 1) % 7) == 0) {
?>
}
}
?>
$(function(){
console.log($("td [date='2015-05-12']"));
});
相关标签:php
本文原创发布php中文网,转载请注明出处,感谢您的尊重!
php日程提醒,php日程控件相关推荐
- java 日程日历_dhtmlxscheduler日历日程控件使用
最近项目需要做一个会议日程安排的功能,通过日历控件查询日程安排.找到了dhtmlxScheduler这个控件,java下的官方网站http://javaplanner.com/docs/index.h ...
- 提供完善的类似于Outlook 2003 Calendar的风格日历日程控件Xtreme Calendar
Xtreme Calendar控件能为 Windows软件开发者提供完善的类似于Outlook 2003 Calendar的风格.Windows开发者能方便的创建可管理指定任务的日程表,对这些任务可按 ...
- 【开源】Winform甘特日程控件GanttPlanner V1.0发布
背景 做过WinForm和Web的朋友们可能都有这个感觉:做用户体验良好的WinForm应用程序要远比Web应用程序困难的多.这是因为Web应用程序毕竟只靠HTML+CSS+JS就能做出各种强大的功能 ...
- vue-lunar-full-calendar日程控件加农历、24节气和中国节假日的功能
依赖包 vue-lunar-full-calendar npm install vue-lunar-full-calendar 即可 例子在 github.com/a306916069/- 上 转载于 ...
- 无法同步谷歌日历_苹果日历不能添加日程提醒怎么办?云提醒软件为你罗列待办事项...
苹果手机上可用来记录日程提醒的软件有提醒事项.备忘录和日历提醒,使用苹果手机的群体会根据个人的喜好选择桌面工具提醒,但是从相关的手机论坛中,网友提出的问题来看,不少人的日历添加日程提醒的按钮呈灰色显示 ...
- 一款日程提醒软件 让你高效度过每一天
随着生活和工作节奏的加快,很多网友表示自己每天从早到晚都没有停下来休息过,总是忙的脚不沾地,但是一天结束后进行复盘,发现自己完成的事情并不多,办事效率没有别人高,这是为什么呢?其实想要在有限的时间内高 ...
- Xamarin XAML语言教程控件模板的模板绑定
Xamarin XAML语言教程控件模板的模板绑定 控件模板的模板绑定 为了可以轻松更改控件模板中控件上的属性值,可以在控件模板中实现模板绑定功能.模板绑定允许控件模板中的控件将数据绑定到公共属性上. ...
- 模态对话框阻塞主线程的话不影响其他线程操作主线程控件(不阻塞)
Task.Factory.StartNew(() => {Thread.Sleep(5000);this.Invoke(new Action(() => {this.button7.Tex ...
- vivo手机怎么添加日程提醒?vivo手机添加日程方法
1:打开手机日程提醒工具,点击底部"待办",并点击+. 2:在输入框里输入文本内容,然后点击铃铛图标添加提醒时间,最后别忘了点击"保存". 3:待办事项新增完成 ...
- VBS实现的日程提醒小工具
给自己留个云备份.VBS 指的是 Visual Basic Script. [说明] remindMe.vbs脚本使用 VisualBasicScript 编写,可以直接双击运行,也可以在命令行环境下 ...
最新文章
- var s=+newDate();
- 洛谷 P4175: bzoj 1146: [CTSC2008]网络管理
- Python学习笔记(六)if判断语句
- 干货:计算机网络知识总结
- phrases practice_七年级短语、固定搭配练习题Phrases practice for Grade seven
- fcn网络结构代码_FCN实现2-模型结构及实现
- mysql 排版 指令_Mysql语句排版
- 带着canvas去流浪系列之二 绘制折线图
- mariadb mysql 重建_(MariaDB/MySQL)之DML(2):数据更新、删除
- 禅道PMS兼容redmine用户认证接口
- Android 父类super.onDestroy();的有关问题
- 天刀服务器未响应,《天涯明月刀手游》画面卡顿解决办法
- 电源模块-LM5117-BUCK- 电路
- 网络流24题 Updating
- 微信小程序之tab切换效果
- 学科03:工程学重要模型
- 洛谷 P2414 [NOI2011] 阿狸的打字机 题解
- 通过you-get在哔哩哔哩下载视频报错处理
- 利用outlook邮箱申请teams账号
- 【GZH逸佳君】:科技感膨爆,观赏性极强:送你PS粒子飞溅特效插件,1秒瞬间爆开