Mui自定义时间格式:
Mui自定义时间格式:
(function($) {
$.init();
$(document).on('tap','.btn',function(){
var obj = getFormJson($('#formid'));
// console.log(obj.add_time);
// console.log(this.getAttribute('value'));
var optionsJson = this.getAttribute('data-options') || '{}';
var options = JSON.parse(optionsJson);
var id = this.getAttribute('id');
console.log(id);
// var name = this.getAttribute('name');
var picker = new $.DtPicker(options);
var _this = this;
console.log(this);
var dtpicker = new mui.DtPicker({
type: "time",//设置日历初始视图模式
// beginDate: new Date(2015, 04, 25),//设置开始日期
// endDate: new Date(2016, 04, 25),//设置结束日期
labels: ['年', '月', '日','时', '分'],//设置默认标签区域提示语
customData: {
h: [
{ value: '00', text: '00' },
{ value: '01', text: '01' },
{ value: '02', text: '02' },
{ value: '03', text: '03' },
{ value: '04', text: '04' },
{ value: '05', text: '05' },
{ value: '06', text: '06' },
{ value: '07', text: '07' },
{ value: '08', text: '08' },
{ value: '09', text: '09' },
{ value: '10', text: '10' },
{ value: '11', text: '11' },
{ value: '12', text: '12' },
{ value: '13', text: '13' },
{ value: '14', text: '14' },
{ value: '15', text: '15' },
{ value: '16', text: '16' },
{ value: '17', text: '17' },
{ value: '18', text: '18' },
{ value: '19', text: '19' },
{ value: '20', text: '20' },
{ value: '21', text: '21' },
{ value: '22', text: '22' },
{ value: '23', text: '23' }
] ,
i:[
{ value: '00', text: '00' },
{ value: '05', text: '05' },
{ value: '10', text: '10' },
{ value: '15', text: '15' },
{ value: '20', text: '20' },
{ value: '25', text: '25' },
{ value: '30', text: '30' },
{ value: '35', text: '35' },
{ value: '40', text: '40' },
{ value: '45', text: '45' },
{ value: '50', text: '50' },
{ value: '55', text: '55' }
]
}//时间/日期别名
});
if(id=="result"){
picker.show(function(rs) {
console.log(rs.value);
_this.value = '' + rs.value;
});
}else{
// var iTems = dtpicker.getSelectedItems()
dtpicker.show(function(items) {
console.log(items.value);
_this.value = '' + items.value;
})
}
},false);
})(mui);
Mui自定义时间格式:的更多相关文章
- linux 获取时间后--自定义时间格式
自定义时间格式 =================================-===================================== #include <stdio.h ...
- Gorm 预加载及输出处理(三)- 自定义时间格式
前言 Gorm 中 time.Time 类型的字段在 JSON 序列化后呈现的格式为 "2020-03-11T18:26:13+08:00",在 Go 标准库文档 - time 的 ...
- Python-时间戳、元组时间的格式、自定义时间格式之间的转换
一.时间戳.元组时间的格式.自定义时间格式之间的转换 1.下面是三者之间的转换关系: 2.代码如下: import time import datetime print(time.time()) #获 ...
- 使用POI读取xlsx文件,包含对excel中自定义时间格式的处理
package poi; import java.io.File; import java.io.FileInputStream; import java.io.FileNotFoundExcepti ...
- iOS- NSDateFormatter (自定义时间格式)
一. NSDateFormatter解释 1. 日期(NSDate)是NSString类的格式(stringWithFormat),也可以改变输出,如果需要输出年代信息等则需要进行转换,等等. 2. ...
- mvc页面中,显示自定义时间格式
1.在model中,遇到datetime格式的字段,用string来表示 model中 /// <summary> /// 开始时间 /// </summary> [Displ ...
- jstl自定义时间格式
<fmt:formatDate value='${time}' pattern='yyyy-MM-dd HH:mm:ss'/> <s:iterator>下的<s:prop ...
- Java 中自定义时间格式
DateFormat df = new SimpleDateFormat("yyyy-MM-dd hh:mm:ss"); Date d = new Date(); String s ...
- Vue 获取时间戳返回自定义时间格式
直接在Vue全局函数定义: Vue.prototype.padLeftZero = function(str) { return ('00' + str).substr(str.length); }; ...
随机推荐
- [Violet]天使玩偶
description Ayu 在七年前曾经收到过一个天使玩偶,当时她把它当作时间囊埋在了地下.而七年后 的今天,Ayu 却忘了她把天使玩偶埋在了哪里,所以她决定仅凭一点模糊的记忆来寻找它. 我们把 ...
- [TJOI2013]最长上升子序列 平衡树
其实是一道性质题. 首先观察到插入的数是递增的, 那么根据上升子序列的性质, 我们的非法情况就是统计到了在一个数前面的后插入的数, 但是由于插入的数是递增的,显然插入这个数后,这个数就是最大的,所以除 ...
- Linux(ubuntu 12.04桌面版) 搭建Android开发环境
因为一些工作上的原因,需要切换到Linux环境下做点开发,我选择的Linux发行版本为ubuntu(我不建议使用fedora,我最开始就是使用的fedora,但发现并不是特别好使,有些插件没办法安装, ...
- BZOJ1006 神奇的国度 【弦图染色——最大势算法MCS】
1006: [HNOI2008]神奇的国度 Time Limit: 20 Sec Memory Limit: 162 MB Submit: 4146 Solved: 1916 [Submit][S ...
- 《Java程序设计》第六周学习总结 20165218 2017-2018-1
20165218 2017-2018-1 <Java程序设计>第六周学习总结 教材学习内容总结 第8章 常用实用类 String类 不可以有子类 在java.lang 包中,被默认引入 S ...
- NOIP2015Day2T2子串(字符串dp)
又被“if(a=b)”坑了QAQ...写C++还是得开Warning,这么久了pascal还没改过来咋回事啊QWQ 题目大意就不说了OWO 网上的题解都不怎么看得懂啊...好像写得都很乱?还是我太sb ...
- JavaScript是如何实现继承的
JavaScript中的function是万能的,除了用于的函数定义,也可以用于类的定义.JavaScript的继承,说起来也是有点怪,没有public,private等访问控制修饰,也没有imple ...
- linux添加vim编辑器和一些用法
vim.tar文件在自己的百度云盘里面,linux目录下 上传vim.tar文件,解压 vim编辑文件的一些快捷方式: n+t打开文件所在目录,显示在左侧 ctrl+w+l 切换到右边文件ctrl+w ...
- Log4J使用实例---日志进行邮件发送或是存入数据库
部分转摘:http://blog.csdn.net/azhao_dn/article/details/9118667 1.根类别(在类别层次结构的顶部,即全局性的日志级别) 配置根Logger,其语法 ...
- 跨域共享cookie和跨域共享session
转载自:http://blog.csdn.net/ahhsxy/article/details/7356128 这里所说的跨域,是指跨二级域名,而且这些域名对应的应用都在同一个app上, 比如我有以下 ...