0
我想在我的應用程序中添加一個日曆。下面的代碼沒有在codeigntier中工作,但是如果將它放到codeigniter之外的另一個文件夾中,它可以正常工作。你能否幫我找出問題所在? 預先感謝日期選取器不能在Codeigniter中工作
<html>
<head>
<link href="calendar/calendar.css" rel="stylesheet" type="text/css" />
<script language="javascript" src="calendar/calendar.js"></script>
</head>
<body>
<?php
//get class into the page
require_once('tc_calendar.php');
$myCalendar = new tc_calendar("date5", true, false);
$myCalendar->setIcon ("calendar/images/iconCalendar.gif");
$myCalendar->setDate(date('d'), date('m'), date('Y'));
$myCalendar->setPath("calendar/");
$myCalendar->setYearInterval(1971, 2035);
$myCalendar->dateAllow('1971-01-01', '2035-01-01');
$myCalendar->setDateFormat('j F Y');
//$myCalendar->setHeight(350);
//$myCalendar->autoSubmit(true, "form1");
$myCalendar->setAlignment('left', 'bottom');
$myCalendar->writeScript();
?>
</body>
</html>
你是如何在codeigniter中加載的?這是一個視圖還是一個純html文件? – ace
如果我在純HTML文件中加載上面的代碼,它工作正常,但是當我將它加載到codeigniter中的視圖文件時,它不起作用。謝謝 –
啊,你是在什麼地方放置你的純html文件,如果它位於codeigniter之外?我認爲它可能與codeigniter一旦加載爲視圖時未找到「calendar/calendar.js」和「calendar/calendar.css」有關。 – ace