easyui 获取并设置当前时间
来源:互联网 发布:双十一淘宝的交易额 编辑:程序博客网 时间:2024/05/16 03:56
//得到当前日期
formatterDate = function(date,type) {
var day = date.getDate() > 9 ? date.getDate() : "0" + date.getDate();
var month = (date.getMonth() + 1) > 9 ? (date.getMonth() + 1) : "0"
+ (date.getMonth() + 1);
if(type=='start'){
return date.getFullYear() + '-' + month + '-01';
}
if(type=='end'){
return date.getFullYear() + '-' + month + '-' + day;
}
};
//初始化查询条件中的日期
window.onload = function() {
$('#startTime').datebox('setValue', formatterDate(new Date(),"start"));
$('#endTime').datebox('setValue', formatterDate(new Date(),"end"));
};
formatterDate = function(date,type) {
var day = date.getDate() > 9 ? date.getDate() : "0" + date.getDate();
var month = (date.getMonth() + 1) > 9 ? (date.getMonth() + 1) : "0"
+ (date.getMonth() + 1);
if(type=='start'){
return date.getFullYear() + '-' + month + '-01';
}
if(type=='end'){
return date.getFullYear() + '-' + month + '-' + day;
}
};
//初始化查询条件中的日期
window.onload = function() {
$('#startTime').datebox('setValue', formatterDate(new Date(),"start"));
$('#endTime').datebox('setValue', formatterDate(new Date(),"end"));
};
0 0
- easyui 获取并设置当前时间
- iOS中获取当前时间和日期并设置格式
- 获取当前时间并格式化
- JQuery为EasyUI设置当前系统时间
- EasyUI datetimebox设置默认值为当前时间
- 获取当前系统时间,设置系统时间
- JS获取当前时间并计算时间差
- jsp页面获取当前时间并格式化
- 获取当前时间 并转为字符串
- VC++获取系统当前时间并显示
- <C++>获取并显示当前时间
- 获取当前时间并转为string
- c 获取当前时间并格式化输出
- JavaScript获取当前时间并动态显示
- js如何获取当前时间 并格式化
- JS 获取当前时间并格式化
- Python获取并输出当前日期时间
- js获取当前时间并格式化
- JAVA 中的 split 用法
- webx中自定义Valve
- 疑问一
- NOIP 2014 飞扬的小鸟
- 二分查找算法
- easyui 获取并设置当前时间
- 【python】mac安装python包遇到的cc问题
- Qt5.1 + vs2012 OpenGL
- PostGresql 服务未监听
- 短信猫 rxtx smslib出错
- 设计模式---状态模式Java示例实现
- dubbo本地缓存提供者信息配置问题
- 4-1 单链表逆转 (20分)
- jsp之简单用户登录(1)