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自定义时间格式:的更多相关文章

  1. linux 获取时间后--自定义时间格式

    自定义时间格式 =================================-===================================== #include <stdio.h ...

  2. Gorm 预加载及输出处理(三)- 自定义时间格式

    前言 Gorm 中 time.Time 类型的字段在 JSON 序列化后呈现的格式为 "2020-03-11T18:26:13+08:00",在 Go 标准库文档 - time 的 ...

  3. Python-时间戳、元组时间的格式、自定义时间格式之间的转换

    一.时间戳.元组时间的格式.自定义时间格式之间的转换 1.下面是三者之间的转换关系: 2.代码如下: import time import datetime print(time.time()) #获 ...

  4. 使用POI读取xlsx文件,包含对excel中自定义时间格式的处理

    package poi; import java.io.File; import java.io.FileInputStream; import java.io.FileNotFoundExcepti ...

  5. iOS- NSDateFormatter (自定义时间格式)

    一. NSDateFormatter解释 1. 日期(NSDate)是NSString类的格式(stringWithFormat),也可以改变输出,如果需要输出年代信息等则需要进行转换,等等. 2.  ...

  6. mvc页面中,显示自定义时间格式

    1.在model中,遇到datetime格式的字段,用string来表示 model中 /// <summary> /// 开始时间 /// </summary> [Displ ...

  7. jstl自定义时间格式

    <fmt:formatDate value='${time}' pattern='yyyy-MM-dd HH:mm:ss'/> <s:iterator>下的<s:prop ...

  8. Java 中自定义时间格式

    DateFormat df = new SimpleDateFormat("yyyy-MM-dd hh:mm:ss"); Date d = new Date(); String s ...

  9. Vue 获取时间戳返回自定义时间格式

    直接在Vue全局函数定义: Vue.prototype.padLeftZero = function(str) { return ('00' + str).substr(str.length); }; ...

随机推荐

  1. 【以前的空间】Poj 3071 Cut the Sequence

    dp+单调性+平衡树 在看某篇论文中看到这道题,但是那篇论文不如这个http://www.cnblogs.com/staginner/archive/2012/04/02/2429850.html 大 ...

  2. [HNOI2007][BZOJ1185] 最小矩形覆盖 [凸包+旋转卡壳]

    题面 BZOJ题面 前置芝士 建议先学习向量相关的计算几何基础 计算几何基础戳这里 思路 用这道题学习一下凸包和旋转卡壳 首先是凸包部分 凸包 求凸包用的算法是graham算法 算法流程如下: 找到$ ...

  3. POJ.1006 Biorhythms (拓展欧几里得+中国剩余定理)

    POJ.1006 Biorhythms (拓展欧几里得+中国剩余定理) 题意分析 不妨设日期为x,根据题意可以列出日期上的方程: 化简可得: 根据中国剩余定理求解即可. 代码总览 #include & ...

  4. odex文件格式

    apk安装或启动时,会通过dexopt来将dex生成优化后的odex文件.过程是将apk中的classes.dex解压后,用dexopt处理并保存为“/data/dalvik-cache/data@a ...

  5. JavaScript时间戳与其格式化

    在 PHP + MySQL (日期类型为datetime) + ajax 应用中,有时候需要用 JavaScript 将时间戳类型格式化为一般的时间类型格式.下面提供一些转换的方法,比较常见的一些总结 ...

  6. HDU4685:Prince and Princess(二分图匹配+tarjan)

    Prince and Princess Time Limit: 6000/3000 MS (Java/Others)    Memory Limit: 65535/32768 K (Java/Othe ...

  7. HDU4612:Warm up(缩点+树的直径)

    Warm up Time Limit: 10000/5000 MS (Java/Others)    Memory Limit: 65535/65535 K (Java/Others)Total Su ...

  8. 【题解】Casting Spells LA 4975 UVa 1470 双倍回文 SDOI 2011 BZOJ 2342 Manacher

    首先要吐槽LRJ,书上给的算法标签是“有难度,需要结合其他数据结构”,学完Manacher才发现几乎一裸题 题目的意思是问原串中有多少个wwRwwR这样的子串,其中wR表示w的反串 比较容易看出来,w ...

  9. Reduce Side Join实现

    关于reduce边join,其最重要的是使用MultipleInputs.addInputPath这个api对不同的表使用不同的Map,然后在每个Map里做一下该表的标识,最后到了Reduce端再根据 ...

  10. IE8动态创建CSS

    IE8动态创建CSS 最近在项目中用到在页面中动态创建CSS方法,记录一下方便以后查看 一. 在IE下动态创建(网上收集3种方法,最后一个方法未测试成功,具体不知道什么原因) 第一种(此方法很麻烦,需 ...