第二章 时间控件(DateTime Picker)
这家伙太懒了,碰到问题才写博文,嘿嘿。
好了进入正题,二话不说,先放地址:
中文:http://www.bootcss.com/p/bootstrap-datetimepicker/index.htm
http://www.malot.fr/bootstrap-datetimepicker/demo.php
http://www.malot.fr/bootstrap-datetimepicker/
今天碰到一个问题是这样的,时间控件显示小时分钟。死定了,全是英文,找了白天才发现startView的意思
上菜了:
@Styles.Render("~/Content/themes/default/bootstrap-datetimepicker.css")
@Scripts.Render("~/Scripts/bootstrap-datetimepicker.js")
@Scripts.Render("~/Scripts/bootstrap-datetimepicker.zh-CN.js") <div class="container" style="padding: 0 15px;">
<small>时间 </small>
<input type="text" id="datetimepicker">
</div> <script type="text/javascript">
$(function () {
$('#datetimepicker').datetimepicker({
format: 'hh:ii',
startView:
});
});
</script>
效果图:
aaarticlea/png;base64,iVBORw0KGgoAAAANSUhEUgAAANsAAAEECAIAAAAu/tZZAAAOaUlEQVR4nO2d7Wvkxh3HBfcHpeD38ZsUGgqlhUJLaaGk1LRwpLS50ofQXEqb5kUDfRvKYTavWvoi1x5J6NGUXFt77ayFubNzdZ3LxeZyPvywsvfBuytp9NAXivdkSaMdraSZn6Tvh0HIszOzX2k/1uyud8eaH8LzLoqPgqKieL721EXfdy+2jus5wTbYQUEpr0w1cz03MNLzPnfR8Xzm+rbjWcwzL8oEBaXMMjXNYp7teNr06uh4vuV4E+aNbG9oeX3T7Ztub+L2Jg4KSpnFDWQbWt7I9rRg/maubzneyHYHpmuMneNz53DoPBmwgwE76KOglFkG7MmAHQ6d43PHGDva9Oo4st3exDk+dx732f4Ze2iw3RNr98TeObZQUMoruyf27on10GD7Z+xxn2nBBXLCvIHpHp87/94bX3vveOnmEQqK/HLtvWPNcT3b8Ua2Z4ydx3127b3jR2e2D4AKHp3ZmuP5FvOGlnd87uyfsaWbR6pTgUajOa5nMq9vuodD56EBI4Finhr5ZMB2TywYCdSiOZ4/YV5v4h702e6JDSOBWqZGOgd9tnOMayRQDIwEtICRgBYwEtACR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AAASUVORK5CYII=" alt="" />
补充:2013-10-29
1.实现日期的选择
aaarticlea/png;base64,iVBORw0KGgoAAAANSUhEUgAAAN0AAAEgCAIAAAC/3eE+AAAQHElEQVR4nO2dW2/cxhmGB/Cf0D/wD9BfSNqcWjSpiyJIGzQ9OCjqFkWdogjcxkGRtgiSq95t4ZvkJsDeGA0QC4bdKAJW8kqi5FgOopMlS5C11h60B1pSpCXX04u119TysFzON8uP5PuAoCkeXg65z87MrjyUOLYeH7Yfm8ed+lGncmDvPbJ3TetBy9ppYsrE9KBllUx775FdObDrRx3zuCMZIA7bj5vfdWqHnZJpbzetjf32eq29Wj1ZrpysVNvLlRNMaZ26r+9q9WS91t6st7cb7ZJp1Q55eGked2qHnbXqyX/mmu9cq5y/WsaUzenitcqni60HLStuJ6WUUtSPOiXTzs01PvyyvFmqN0FW2SzVP/yynJtrxO2klFKKyoG93bQufF7eKrfa7bYNskq73d4qty5eq8TtpJRSir1H9ma9ff5qud1ux10YEDPtdvv81XLcpZBSSrFrWuu19vmrZdu24y4MiBnbtrl4+aBlrVZP4CWQrLzcaVrLFXgJpOTm5UoV7TiQkpuXqC9BF3gJOAIvAUfgJeBIMrx8/ykDV3bXhznck/CZ4Q8Pf3bQIwFeOl/R3rLnSvlUgoGHexI+M/zh4c8OnKTNS/ePITdFzoxcThBAArx0EtnLMHWeopfDlhMEkCQvA9pZv908E953MVSm3+HBZUMXcygS42X4XmNc7bjfnj0j4WV4kuFlyDrJb+cwmyJnRssHwSTAS7/+ot8O5J/HBx4YppyQciiS4aVnZ86zexd+pScqh/v1WdGzjEACvAQZBF4CjsBLwBF4CTgCLwFHeHmJcRSgCy8vUV+CLoy8xDhd0IORl0M916BWq21tbY2gWCAWGHnZew7MQC9rtdr9+/ehZoph5GXlwN5utC/8t2x+F/R8oq6UvWWomUrK5snFL3g8N6t+1CmZ1ieLrY+marVD7yrTKWVvDdRMGbVD+6Op2ieLrbgLImX3uazVQ/tBy8rNNS5+4fFc1jc/Xf73xDf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RWLxUqlYllW3AUDGcWyrN3d3WKxuLe3J1qt1v7+frlc3t3dXVpaKhQKN27cuH79+sTExMTExDUAdNLV7Pr16zdu3CgUCktLS7u7u+VyWZimWa/XK5XKw4cPd3Z2tra2NjY21tfX19bWVldXV1ZWlgHQw8rKyurq6tra2vr6+sbGxtbW1s7OzsOHDyuVyv8BE8BMq7fhYn8AAAAASUVORK5CYII=" alt="" />
主要代码:
$('#datetimepicker').datetimepicker({
minView: "month", //选择日期后,不会再跳转去选择时分秒
format: "yyyy-mm-dd", //选择日期后,文本框显示的日期格式
language: 'zh-CN', //汉化
autoclose:true //选择日期后自动关闭
});
补充:2013-11-29
出生日期
1.data-date、data-date-format、input的日期格式必须一致,否则产生时间显示格式不匹配等小问题
2. minView: 'month',为显示选择日期的面板,可根据需要进行调整
<div class="form-group col-md-6">
<label class="control-label col-md-4">
出生日期</label>
<div class="col-md-8">
<div id="BirthDiv" class="input-group date form_datetime" data-date="@Model.BirthDT.ToString("yyyy-MM-dd")" data-date-format="yyyy-mm-dd" >
@Html.TextBox("BirthDT", Model.BirthDT.ToString("yyyy-MM-dd"), new { @class = "form-control " })
<span class="input-group-addon"><span class="glyphicon glyphicon-remove"></span>
</span><span class="input-group-addon"><span class="glyphicon glyphicon-th"></span>
</span>
</div>
@Html.ValidationMessageFor(t => t.BirthDT, null, new { @class = "help-block" })
</div>
</div>
<script type="text/javascript">
$(function () {
$('#BirthDiv').datetimepicker({
language: 'zh-CN',
autoclose: ,
todayBtn: ,
pickerPosition: "bottom-left",
minuteStep: ,
format: 'yyyy-mm-dd',
minView: 'month' //日期时间选择器所能够提供的最精确的时间选择视图。
});
});
</script>
第二章 时间控件(DateTime Picker)的更多相关文章
- 时间控件(DateTime Picker)
中文:http://www.bootcss.com/p/bootstrap-datetimepicker/index.htm http://www.malot.fr/bootstrap-datetim ...
- 第三部分:Android 应用程序接口指南---第二节:UI---第二章 输入控件
第2章 输入控件 输入控件是应用程序中用户接口的一种交互式组件.Android提供了大量的可供人们在UI中使用的控件,比如按钮.文本区域.(带滑块的)进度条.复选框.缩放按钮以及切换按钮等等. 在UI ...
- ASP.NET自定义控件组件开发 第四章 组合控件开发CompositeControl
原文:ASP.NET自定义控件组件开发 第四章 组合控件开发CompositeControl 第四章 组合控件开发CompositeControl 大家好,今天我们来实现一个自定义的控件,之前我们已经 ...
- ASP.NET自定义控件组件开发 第三章 为控件添加事件 前篇
原文:ASP.NET自定义控件组件开发 第三章 为控件添加事件 前篇 第三章 为控件添加事件 好了,我们之前以前开发一个控件.而且也添加了属性,开发也很规范,但是那个控件还差最后一点:添加事件. 系列 ...
- ASP.NET自定义控件组件开发 第三章 为控件添加事件 后篇
原文:ASP.NET自定义控件组件开发 第三章 为控件添加事件 后篇 第三章 为控件添加事件 后篇 前一篇文章只是简单的说了下事件,但是大家应该方法,在ASP.NET自定义控件中只是简单那么定义事件是 ...
- 日期与时间控件QDate, QTime, QDateTime
QDate类用于处理公历日期.QTime类用于处理时间.QDateTime类将QDate对象和QTime对象整合为一个对象 QDate: from PyQt5.QtCore import QDate, ...
- Bootstrap 时间控件datetimepicker与timepicker
一.datetimepicker 首先,我们看看点击选择时间的时候的展示页面吧 年 月 ...
- 学习日期时间控件 daterangepicker
aterangepicker 是一款日期时间控件,可选择“年,月,日,时,分,秒”,可选择单面板,也可选择双面板(起止时间). 单面板示例:daterangepicker 单面板 codepen 在线 ...
- Html5+Mui前端框架,开发记录(四):下拉菜单绑定数据、搜索、时间控件
1.下拉菜单绑定数据,选择后回传值 1)html: <div class="mui-input-row"> <label>xxx:</label> ...
随机推荐
- ArcGIS补丁包下载
http://zhihu.esrichina.com.cn/?/feature/patchdownload
- php 安全过滤函数代码
php 安全过滤函数代码,防止用户恶意输入内容. //安全过滤输入[jb] function check_str($string, $isurl = false) { $string = preg_r ...
- iOS 清理缓存功能实现第一种方法
添加一个提示框效果导入第三方MBProgressHUD #import "MBProgressHUD+MJ.h" /** * 清理缓存第一种方法 */ -(void)clearCa ...
- C语言-12-日期和时间处理标准库详细解析及示例
概述 标准库 提供了用于日期和时间处理的结构和函数 是C++语言日期和时间处理的基础 与时间相关的类型 clock_t,本质是:unsigned long typedef unsigned long ...
- Unity3D插件分享
网上看到一个讲unity3D插件的,看着不错,转载过来. 本文汇总了近百个Unity3D插件,供大家参考下载. 2D_Toolkit_1.51 动画开发插件包 FingerGestures 触摸插件 ...
- Effective Java 23 Don't use raw types in new code
Generic types advantage Parameterized type can provide erroneous check in compile time. // Parameter ...
- Effective Java 60 Favor the use of standard exceptions
Benefits to reuse preexisting exceptions It makes your API easier to learn and use. Programs using y ...
- facebook开源前端UI框架React初探
最近最火的前端UI框架非React莫属了.赶紧找时间了解一下. 项目地址:http://facebook.github.io/react/ 官方的介绍:A JavaScript library for ...
- IIS does not list a website that matches the launch url
233down voteaccepted I hate answering my questions: in my question i stated that i was running VS un ...
- Hibernate案例-------基于xml配置,使用Hibernate实现对员工表的增、删、改、查功能
1.1 问题 使用Hibernate实现对员工表的增.删.改.查. 1.2 方案 Hibernate使用步骤: 导入Hibernate包,以及数据库驱动包. 引入Hibernate主配置文件hiber ...