2 Star 39 Fork 14

笔下光年/Light Year Admin Using v5 For Example

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
lyear_js_material_datetimepicker.html 4.38 KB
一键复制 编辑 原始数据 按行查看 历史
笔下光年 提交于 2022-12-10 17:27 . feat:代码上传
<!DOCTYPE html>
<html lang="zh">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=0, minimal-ui">
<meta name="keywords" content="LightYear,LightYearAdmin,光年,后台模板,后台管理系统,光年HTML模板">
<meta name="description" content="Light Year Admin V5是一个基于Bootstrap v5.1.3的后台管理系统的HTML模板。">
<title>时间选择器 Bootstrap-material-datetimepicker - 光年(Light Year Admin V4)后台管理系统模板</title>
<link rel="shortcut icon" type="image/x-icon" href="favicon.ico">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-touch-fullscreen" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="default">
<link rel="stylesheet" type="text/css" href="css/materialdesignicons.min.css">
<link rel="stylesheet" type="text/css" href="css/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="js/bootstrap-material-datetimepicker/bootstrap-material-datetimepicker.min.css">
<link rel="stylesheet" type="text/css" href="css/style.min.css">
<style>
</style>
</head>
<body>
<div class="container-fluid">
<div class="row">
<div class="col-lg-12">
<div class="card">
<header class="card-header">
<div class="card-title">时间选择器 Bootstrap-material-datetimepicker</div>
</header>
<div class="card-body">
<div class="mb-3">
<label for="date-picker" class="form-label">日期选择器</label>
<input type="text" id="date-picker" class="form-control" placeholder="日期" />
</div>
<div class="mb-3">
<label for="time-picker" class="form-label">时间选择器</label>
<input type="text" id="time-picker" class="form-control" placeholder="时间" />
</div>
<div class="mb-3">
<label for="date-format" class="form-label">日期时间</label>
<input type="text" id="date-format" class="form-control" placeholder="开始日期时间" />
</div>
<div class="mb-3">
<label for="min-date" class="form-label">最小日期</label>
<input type="text" id="min-date" class="form-control" placeholder="开始日期" />
</div>
<div class="mb-3">
<label for="date-start" class="form-label">事件</label>
<div class="input-group">
<input class="form-control" type="text" id="date-start" placeholder="从" />
<span class="input-group-text"><i class="mdi mdi-chevron-right"></i></span>
<input class="form-control" type="text" id="date-end" placeholder="至" />
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<script type="text/javascript" src="js/jquery.min.js"></script>
<script type="text/javascript" src="js/popper.min.js"></script>
<script type="text/javascript" src="js/bootstrap.min.js"></script>
<script type="text/javascript" src="js/momentjs/moment.min.js"></script>
<script type="text/javascript" src="js/momentjs/locale/zh-cn.min.js"></script>
<script type="text/javascript" src="js/bootstrap-material-datetimepicker/bootstrap-material-datetimepicker.min.js"></script>
<script type="text/javascript" src="js/main.min.js"></script>
<script type="text/javascript">
$(document).ready(function(){
// 日期
$('#date-picker').bootstrapMaterialDatePicker({
time: false,
//lang: 'zh-cn', // 已将默认改成zh-cn
clearButton: true
});
// 时间
$('#time-picker').bootstrapMaterialDatePicker({
date: false,
shortTime: false,
format: 'HH:mm'
});
// 日期时间格式化
$('#date-format').bootstrapMaterialDatePicker({
format : 'YYYY-MM-DD HH:mm'
});
// 最小日期
$('#min-date').bootstrapMaterialDatePicker({
format : 'YYYY-MM-DD HH:mm',
minDate : new Date()
});
// 事件
$('#date-end').bootstrapMaterialDatePicker({
weekStart : 0,
format: 'YYYY-MM-DD HH:mm'
});
$('#date-start').bootstrapMaterialDatePicker({
weekStart : 0,
format: 'YYYY-MM-DD HH:mm',
shortTime : true
}).on('change', function(e, date) {
$('#date-end').bootstrapMaterialDatePicker('setMinDate', date);
});
});
</script>
</body>
</html>
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
HTML
1
https://gitee.com/yinqi/light-year-admin-using-v5-for-example.git
git@gitee.com:yinqi/light-year-admin-using-v5-for-example.git
yinqi
light-year-admin-using-v5-for-example
Light Year Admin Using v5 For Example
master

搜索帮助

0d507c66 1850385 C8b1a773 1850385