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