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. [HDU4532]湫秋系列故事——安排座位

    题面在这里 description 有\(n\)种颜色的小球,每种颜色的小球有\(a_i\)个: 要把它们摆成一排,求相邻小球颜色不相同的摆放方案数. 任意两个合理的安排方法,只要有一个位置的同学不同 ...

  2. redux connect的浅比较说明

    redux的connect方法是一个高阶组件,对包装的组件会在ShouldComponentUpdate中实现一个默认的浅比较. connect形式如下: connect([mapStateToPro ...

  3. sass的循环for,while,each

    1. for @for $i from 1 to 10 { .border-#{$i} { border: #{$i}px solid blue; } } 2. while $i: 6; @while ...

  4. pandas模块(数据分析)------dataframe

    DataFrame DataFrame是一个表格型的数据结构,含有一组有序的列,是一个二维结构. DataFrame可以被看做是由Series组成的字典,并且共用一个索引. 一.生成方式 import ...

  5. Apache 403 错误解决方法-让别人可以访问你的服务器(转)

    有一次做好了一个效果放在自己电脑的服务器上,让同学查看(同处于校园网中),却不知apache一直显示403 错误,对方没有权限访问,我知道这应该是配置文件httpd.conf中的问题,网上搜了一下其他 ...

  6. snmp代码篇

    相关链接:Snmp学习笔记使用snmp4j实现Snmp功能(一)使用snmp4j实现Snmp功能(二)使用snmp4j实现Snmp功能(三) SNMP是英文“Simple Network Manage ...

  7. Centos6.5+Python2.7 +ffmpeg+opencv2自动安装脚本

    今天安装opencv折腾了多个小时,为以后安装少走弯路,脚本安装 完整 脚本如下: #! /bin/bash sudo yum install -y gcc g++ gtk+-devel libjpe ...

  8. Linux下实现文档在线浏览

    使用php实现百度文库功能,网上搜索到的方案,实现doc转pdf,pdf转swf,然后显示出来. 这里简单的记录下,[doc转pdf,pdf转swf]两个功能的搭建流程. doc转pdf 使用到下列程 ...

  9. php防止用户输入进行跨站攻击的方式

    1.对用户输入的内容进行转义 //1.过滤内容中html标记 $userinput=strip_tags($userinput); //2.转换成HTML实体 $userinput=htmlentit ...

  10. sql cmd命令执行sqlserver的sql文件

    有的时候,我们通过Log Explorer工具根据日志生成的回滚脚本,或者其他情况我们得到的脚本文件,通过sqlserver打开脚本文件的方式不爽,我们可以这样: 方式一: osql -S . -U ...