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. [CF1095F]Make It Connected

    题目大意:给你$n(n\leqslant2\times10^5)$个点和$m(m\leqslant2\times10^5)$条边,第$i$个点点权为$a_i$.连接$u,v$两个点的代价为$a_u+a ...

  2. BZOJ1492:[NOI2007]货币兑换——题解

    http://www.lydsy.com/JudgeOnline/problem.php?id=1492 (题目描述太长了不粘贴了……) ……………………………………………………… 我 是自己做的 抄 ...

  3. selenium - webdriver - 设置元素等待

    隐式等待:implicitly_wait(value), value默认是0 from selenium import webdriverfrom selenium.common.exceptions ...

  4. ACM1829并查集

    A Bug's Life Problem Description Background Professor Hopper is researching the sexual behavior of a ...

  5. AngularJs 中的CheckBox前后台交互

    前台页面: <div class="form-group"> <label for="CompanyName" class="col ...

  6. 增强学习Reinforcement Learning经典算法梳理3:TD方法

    转自:http://blog.csdn.net/songrotek/article/details/51382759 博客地址:http://blog.csdn.net/songrotek/artic ...

  7. uva 10683 Fill

    https://vjudge.net/problem/UVA-10603 题意: 倒水问题,输出最少的倒水量和目标水量 如果无解,目标水量就是尽可能接近给定点的目标水量,但不得大于给定的目标水量 推推 ...

  8. ReaderWriterLockSlim 类

    今天在看Nop源码时,PluginManager中用到了ReaderWriterLockSlim类,于是简单做个笔记. ReaderWriterLockSlim 表示用于管理资源访问的锁定状态,可实现 ...

  9. c版http服务器 shttpd-1.38 vs2013

    有个项目,本来是外网的.要做一个局域网版本. 项目启动就获取一大堆http的数据.考虑到可以提供http服务的软件虽然多,但是多要安装这样那样的软件,还要配置环境或者配置资源等问题. 发布的时候给人一 ...

  10. 【Foreign】画方框 [主席树]

    画方框 Time Limit: 10 Sec  Memory Limit: 256 MB Description Input Output 输出一行一个整数,表示 CD 最多可能画了几个方框. Sam ...