<!DOCTYPE html>
<html lang="zh">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>bootstrap4日期时间选择器插件</title>
<link href="https://cdn.bootcss.com/bootstrap/4.0.0/css/bootstrap.min.css" rel="stylesheet">
<link rel="stylesheet" type="text/css" href="css/htmleaf-demo.css"><!--演示页面样式,使用时可以不引用-->
<link rel="stylesheet" href="https://getbootstrap.com/assets/css/docs.min.css" />
<link href="http://cdn.bootcss.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet">
<link href="assets/theme/css/base.css" rel="stylesheet">
<link href="css/highlight.min.css" rel="stylesheet">
<link href="assets/theme/css/tempusdominus-bootstrap-4.css" rel="stylesheet">
<!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
<script src="https://oss.maxcdn.com/libs/respond.js/1.3.0/respond.min.js"></script>
<![endif]-->
<script src="js/jquery-1.11.0.min.js" type="text/javascript"></script>
<script type="text/javascript" src="js/popper.min.js"></script>
<script src="https://cdn.bootcss.com/bootstrap/4.0.0/js/bootstrap.min.js"></script>
<script type="text/javascript" src="js/moment-with-locales.min.js"></script>
<script type="text/javascript" src="js/moment-timezone-with-data-2012-2022.min.js"></script>
<script src="assets/theme/js/base.js"></script>
<script src="js/highlight.min.js"></script>
<script src="assets/theme/js/tempusdominus-bootstrap-4.js"></script>
</head>
<body>
<div class="htmleaf-container">
<header class="htmleaf-header">
<h1>bootstrap4日期时间选择器插件 <span>A jQuery plugin designed to provide gallery view for images</span></h1>
<div class="htmleaf-links">
<a class="htmleaf-icon icon-htmleaf-home-outline" href="http://www.jb51.net/" title="脚本之家" target="_blank"><span> 脚本之家</span></a>
<a class="htmleaf-icon icon-htmleaf-arrow-forward-outline" href="http://www.jb51.net/" title="返回下载页" target="_blank"><span> 返回下载页</span></a>
</div>
</header>
<div class="container-fluid">
<div class="row">
<div class="col-12 col-md-3 col-xl-2 bd-sidebar"><nav class="bd-links" id="docsNavbarContent">
<div class="bd-toc-item active">
<ul class="nav bd-sidenav">
<li class="active bd-sidenav-active"><a href="#bootstrap4-v5-docs">Bootstrap4 v5 Docs</a></li>
<li><a href="#minimum-setup">Minimum Setup</a></li>
<li><a href="#using-locales">Using Locales</a></li>
<li><a href="#time-only">Time Only</a></li>
<li><a href="#date-only">Date Only</a></li>
<li><a href="#no-icon-input-field-only">No Icon (input field only):</a></li>
<li><a href="#enableddisabled-dates">Enabled/Disabled Dates</a></li>
<li><a href="#linked-pickers">Linked Pickers</a></li>
<li><a href="#custom-icons">Custom Icons</a></li>
<li><a href="#view-mode">View Mode</a></li>
<li><a href="#min-view-mode">Min View Mode</a></li>
<li><a href="#disabled-days-of-the-week">Disabled Days of the Week</a></li>
<li><a href="#inline">Inline</a></li>
<li><a href="#multidate">Multidate</a></li>
<li><a href="#setting-options">Setting Options</a></li>
</ul>
</div>
</nav></div>
<div class="col-12 col-md-9 col-xl-8 py-md-3 pl-md-5 bd-content" role="main">
<h1 class="bd-title">Usage</h1>
<h1 id="bootstrap4-v5-docs">Bootstrap4 v5 Docs</h1>
<div class="alert alert-info">
<strong>Note</strong>
All functions are accessed via the <code>$('#datetimepicker').datetimepicker(FUNCTION)</code>
</div>
<h3 id="minimum-setup">Minimum Setup</h3>
<div class="container">
<div class="row">
<div class="col-sm-6">
<div class="form-group">
<div class="input-group date" id="datetimepicker1" data-target-input="nearest">
<input type="text" class="form-control datetimepicker-input" data-target="#datetimepicker1"/>
<div class="input-group-append" data-target="#datetimepicker1" data-toggle="datetimepicker">
<div class="input-group-text"><i class="fa fa-calendar"></i></div>
</div>
</div>
</div>
</div>
<script type="text/javascript">
$(function () {
$('#datetimepicker1').datetimepicker();
});
</script>
</div>
</div>
<h4 id="code">Code</h4>
<pre><code><div class="container">
<div class="row">
<div class="col-sm-6">
<div class="form-group">
<div class="input-group date" id="datetimepicker1" data-target-input="nearest">
<input type="text" class="form-control datetimepicker-input" data-target="#datetimepicker1"/>
<div class="input-group-append" data-target="#datetimepicker1" data-toggle="datetimepicker">
<div class="input-group-text"><i class="fa fa-calendar"></i></div>
</div>
</div>
</div>
</div>
<script type="text/javascript">
$(function () {
$('#datetimepicker1').datetimepicker();
});
</script>
</div>
</div>
</code></pre>
<hr />
<h3 id="using-locales">Using Locales</h3>
<div class="container">
<div class="row">
<div class="col-sm-6">
<div class="form-group">
<div class="input-group date" id="datetimepicker2" data-target-input="nearest">
<input type="text" class="form-control datetimepicker-input" data-target="#datetimepicker2"/>
<div class="input-group-append" data-target="#datetimepicker2" data-toggle="datetimepicker">
<div class="input-group-text"><i class="fa fa-calendar"></i></div>
</div>
</div>
</div>
</div>
<script type="text/javascript">
$(function () {
$('#datetimepicker2').datetimepicker({
locale: 'zh-cn'
});
});
</script>
</div>
</div>
<h4 id="code_1">Code</h4>
<pre><code><div class="container">
<div class="row">
<div class="col-sm-6">
<div class="form-group">
<div class="input-group date" id="datetimepicker2" data-target-input="nearest">
<input type="text" class="form-control datetimepicker-input" data-target="#datetimepicker2"/>
<div class="input-group-append" data-target="#datetimepicker2" data-toggle="datetimepicker">
<div class="input-group-text"><i class="fa fa-calendar"></i></div>
</div>
</div>
</div>
</div>
<script type="text/javascript">
$(function () {
$('#datetimepicker2').datetimepicker({