### WeUI移動頁面實現時間選擇器(年-月-日-時-分)
```javascript
$('.ma_expect_date').click(function(event) {
var _this = this;
weui.datePicker({
start: new Date(),
end: 2030,
defaultValue: [new Date().getFullYear(), new Date().getMonth()+1, new Date().getDate()],
onConfirm: function(result){
// 二級調用:時間
$('.ma_expect_date_picker .weui-picker').on('animationend webkitAnimationEnd', function() {
show_expect_time_picker(_this, result);
});
},
id: 'ma_expect_date',
className: 'ma_expect_date_picker'
});
});
// -----------------------二級調用:時間
var hours = [],
minites = [],
symbol = [{ label: ':', value: 0 }];
function show_expect_time_picker(_this, date) {
var date = date[0].label + date[1].label + date[2].label;
if (!hours.length) {
for (var i = 0; i< 24; i++) {
var hours_item = {};
hours_item.label = ('' + i).length === 1 ? '0' + i : '' + i;
hours_item.value = i;
hours.push(hours_item);
}
}
if (!minites.length) {
for (var j= 0; j < 60; j++) {
var minites_item = {};
minites_item.label = ('' + j).length === 1 ? '0' + j : '' + j;
minites_item.value = j;
minites.push(minites_item);
}
}
weui.picker(hours, symbol, minites, {
defaultValue: [new Date().getHours()+1, 0, 0],
onConfirm: function(result) {
var time = result[0].label + ':' + result[2].label;
var expect_date = date + ' ' + time;
$(_this).find('.weui-cell__ft').text(expect_date);
},
id: 'ma_expect_time'
});
}
```
- 前端指南
- 基礎
- HTML、HTTP、web綜合問題
- css部分
- 學習指南
- 開發指南
- css指南
- JavaScript
- 視圖、文件
- canvas
- 二維碼的生成
- 64碼及圖片
- weui
- Promise
- 第三方js
- 網絡請求
- 字符串,數組,時間
- 時間類
- Css
- 布局封裝
- 媒體布局
- 九宮格圖片自適應
- 兩行顯示,且省略
- uni-app
- uniapp踩坑指南
- 表單類
- 商品規格
- 頁面操作
- H5端返回按鈕不顯示
- H5解決瀏覽器跨域問題
- uView——Waterfall 瀑布流
- uniapp中使用復制功能(復制文本到粘貼板)
- 動態導航欄的實現
- React
- React基礎
- 微信小程序
- 上傳多圖
- uni-app 微信小程序生成小程序碼二維碼帶參數
- 小程序分享圖片給好友,到朋友圈,保存到本地
- 緩存封裝
- Vue
- 深度作用選擇器deep
- 使用js實現列表無限循環滾動(橫向)
- js 無限循環垂直滾動列表
- 可視化
- AntV
- 玫瑰圖