1.引入
<link rel="stylesheet" href="{% static "plugin/bootstrap-datepicker/css/bootstrap-datepicker.min.css" %}">
<script src="{% static "plugin/bootstrap-datepicker/js/bootstrap-datepicker.min.js" %}"></script> <script src="{% static "plugin/bootstrap-datepicker/locales/bootstrap-datepicker.zh-CN.min.js" %}"></script>
2.初始化
function initDataPicker() {
$("#id_start_time,#id_end_time").datepicker({ format:"yyyy-mm-dd", startData:"0", language:"zh-CN", autoclose:true }); }