我有一个工作的PHP页面,其中来自jquery的datepicker脚本可以正常工作。我决定将HighCharts包含在同一页面中。一旦我这样做,datepicker就会停止工作。如果我删除highcharts,datepicker开始没有问题。我尝试将noconflict用于datepicker,但是没有用。有人知道如何让jquery datepicker与highcharts一起使用吗?
<link rel="stylesheet" href="../../style.css" type="text/css" media="screen" />
<link rel="stylesheet" href="../../style/menustyle.css" type="text/css" media="screen" />
<link rel="stylesheet" href="../../scripts/datepicker/jquery-ui.css" />
<script src="../../scripts/datepicker/jquery-1.9.1.js"></script>
<script src="../../scripts/datepicker/jquery-ui.js"></script>
<style>
.auto-style1 {
font-family: "Lucida Calligraphy";
text-align:center;
}
</style>
<script>
$(function() {
$( "#Date1" ).datepicker({
changeMonth: true,
changeYear: true
});
});
$(function() {
$( "#Date2" ).datepicker({
changeMonth: true,
changeYear: true
});
});
</script>
</head>
<body style="color: #black; background-color: #0000FF;">
<div align="center"id="MainWrapper" style="width: 90%">
<div id="Maincontainer" style="width:100%">
<div id="PageHeader">
<?php include_once("../../template/template_header.php");?>
</div>
<div id="leftcolumn">
<?php include_once("../../template/menu.php"); ?>
</div>
<div id="content" style="background-color:#EEEEEE;height:auto;width:70%;float:left;">
<h2 class="auto-style1">Call Exception Tracker - Reporting Portal</h2>
<form name="reportform" method="post">
<table class="auto-style1" width="100%">
<tr>
<td style="height: 30px; width: 231px;" valign="bottom">From <input name="Date1" id="Date1" type="text" /></td>
<td style="height: 30px; width: 193px" valign="bottom">to <input name="Date2" id="Date2" type="text" /></td>
</td>
</tr>
</table>
</form>
<br />
<div id="container" align="center" width="99%">
<?php include_once("pie.php"); ?> //This is where HighCharts comes in
</div>
<div id="info"></div>
</div>
<div id="PageFooter">
<?php include_once("../../template/template_footer.php");?>
</div>
</div>
</div>
</body>