<script> $(function () { //设置日期范围 $( "#start" ).datepicker({ language:"zh-CN", format:"yyyy-mm-dd", autoclose: true, todayHighlight: true }).on('changeDate',function(){ d = new Date($('#start').val()); d.setMonth(d.getMonth()+1); $('#end').datepicker('setStartDate',$('#start').val()); $('#end').datepicker('setEndDate',d); }); $( "#end" ).datepicker({ language:"zh-CN", format:"yyyy-mm-dd", autoclose: true, todayHighlight: true }).on('changeDate',function(){ d = new Date($('#end').val()); d.setMonth(d.getMonth()-1); $('#start').datepicker('setEndDate',$('#end').val()); $('#start').datepicker('setStartDate',d); }); }); var data = eval("{$data}"); Highcharts.chart('container', { chart: { type: 'spline', }, title: { text: '订单交易额统计' }, subtitle: { text: '' }, yAxis: { title: { text: '交易额' }, labels: { formatter: function () { return this.value + '元'; } } }, xAxis: { title: { text: '日期' }, type: 'category', }, legend: { enabled: false }, credits: { enabled: false }, plotOptions: { spline: { marker: { enable: false } } }, series: [{ name: '交易额', data:data }] }); </script>
bootstrap-datepicker时间设置
最新推荐文章于 2024-08-29 11:11:12 发布