日期 bootsrtap-datatimepicker and bootstrap-datepicker 支持中文
来源:互联网 发布:数据链路层的数据单位 编辑:程序博客网 时间:2024/06/05 20:06
引用 bootsrtap-datatimepicker and bootstrap-datepicker 控件,发现官方控件不支持中文
1,bootstrap-datepicker - 》解决方法:
从GitHub上下载下面这个第三方的已经支持本地化的,https://github.com/eternicode/bootstrap-datepicker,
只需要下载2个文件
bootstrap-datepicker.js
bootstrap-datepicker.zh-CN.js即可。
调用:
<script src="/assets/js/date-time/bootstrap-datepicker.js"></script>
<script src="/assets/js/date-time/locales/bootstrap-datepicker.zh-CN.js"></script>
$('.date-picker').datepicker({
language: 'zh-CN',
autoclose: true,
todayHighlight: true
});
出处:http://blchen.com/make-bootstrap-datepicker-support-chinese/
2,bootstrap-datetimepicker - 》解决方法:
bootstrap-datetimepicker的本地化显示依赖于moment插件。也就是说moment插件提供了多语言的内容支持,而bootstrap-datetimepicker没有语言内容。
为此,如果需要支持简体中文的显示,就需要加载中文的资源文件。
在moment的官网,下载moment+locales.js,查找到’zh-CN’部分,另存为js文件,在moment.js和bootstrap-datetimepicker.js之间加载即可!
github:https://github.com/moment/moment
<script src=
"assets/thirdparty/bootstrap-datetimepicker/js/moment.js"
></script>
<script src=
"assets/thirdparty/bootstrap-datetimepicker/js/moment_zh-CN.js"
></script>
<script src=
"assets/thirdparty/bootstrap-datetimepicker/js/bootstrap-datetimepicker.js"
></script>
出处:http://www.myext.cn/c/a_6181.html
- 日期 bootsrtap-datatimepicker and bootstrap-datepicker 控件支持中文
- 日期 bootsrtap-datatimepicker and bootstrap-datepicker 支持中文
- bootsrtap-datatimepicker 日期中文
- bootstrap-datepicker日期范围
- bootstrap-datepicker 日期格式设置
- bootstrap datepicker日期插件汉化
- bootstrap datatimepicker 兼容问题
- Datepicker-for-Bootstrap 日期选择插件
- 日期控件jeDate和bootstrap datepicker
- Bootstrap的DatePicker日期范围选择
- bootstrap日期时间选择器datepicker的使用
- bootstrap-datepicker 插件修改为默认中文
- bootstrap-datepicker 插件修改为默认中文
- bootstrap-datepicker 插件修改为默认中文
- bootstrap-datatimepicker双击失效问题解决。
- bootstrap-datepicker
- Bootsrtap学习之一:如何使用Bootstrap
- 利用JavaScript和bootstrap-datepicker设置可选日期
- OpenTSDB简介
- OSMOCOMBB新手指南
- Hello Kotlin(四)变量和属性
- vue.js字符串转化json
- android.os.NetworkOnMainThreadException,Android根据图片URL加载图片
- 日期 bootsrtap-datatimepicker and bootstrap-datepicker 支持中文
- Android apk 反汇编
- 编程思想之多线程与多进程(1)——以操作系统的角度述说线程与进程
- mysql配置文件中sql_mode
- hdu 4799 LIKE vs CANDLE
- 欢迎使用CSDN-markdown编辑器
- tensorflow_mnist数据集卷积神经网络实例
- 利用jQuery 实现一个简单的侧边菜单隐藏显示功能
- Json以及Jsonlib的使用