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); }; ...
随机推荐
- [洛谷P3380]【模板】二逼平衡树(树套树)
题目大意:有$5$种操作: $1\;l\;r\;k:$查询$k$在区间$[l,r]$内的排名 $2\;l\;r\;k:$查询区间$[l,r]$内排名为$k$的值 $3\;pos\;k:$把第$pos$ ...
- POJ1990:MooFest——题解
http://poj.org/problem?id=1990 题目大意:定义一对在树轴上的点,每对点产生的值为两点权值最大值*两点距离,求点对值和. 显然n*n复杂度不行,我们需要用树状数组维护两个东 ...
- jquery实现奇偶行赋值不同css值
<html> <head> <title>jquery奇偶行css效果</title> <script src="../../jquer ...
- #define用法详解
1.#define 的作用 在C或C++语言源程序中允许用一个标识符来表示一个字符串,称为“宏”.被定义为“宏”的标识符称为“宏名”.在编译预处理时,对程序中所有出现的“宏名”,都用宏定义中的字符串去 ...
- javascript功能封装
实现方式其实很简单,我在代码打上注释,大家就懂了! var _date=[],dateData=["1月","2月","3月",&qu ...
- redis 模糊查找keys
Redis入门教程可参考:超强.超详细Redis数据库入门教程 Redis操作命令可参考:Redis操作命令总结 redis可以通过命令Keys Match来进行键值的模糊匹配,借助StackExch ...
- JAVA获取Classpath根路径的方法
方法一: String path = Test.class.getResource("/").toString(); System.out.println("path = ...
- 【BZOJ5010】【FJOI2017】矩阵填数 [状压DP]
矩阵填数 Time Limit: 10 Sec Memory Limit: 128 MB[Submit][Status][Discuss] Description 给定一个 h*w 的矩阵,矩阵的行 ...
- 牛客网刷题(纯java题型 31~60题)
牛客网刷题(纯java题型 31~60题) 重写Override应该满足"三同一大一小"三同:方法名相同,参数列表相同,返回值相同或者子类的返回值是父类的子类(这一点是经过验证的) ...
- 【ALB学习笔记】基于多线程方式的串行通信接口数据接收案例
基于多线程方式的串行通信接口数据接收案例 广东职业技术技术学院 欧浩源 1.案例背景 在本博客的<[CC2530入门教程-06]CC2530的ADC工作原理与应用>中实现了电压数据采集的 ...