datepicker codeigniter 2.2问题 [英] datepicker codeigniter 2.2 problem

查看:158
本文介绍了datepicker codeigniter 2.2问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

希望整合一个jquery datepicker到我的codeigniter项目..问题是我不能得到它的工作..我的源代码来自 http://view.jquery.com/tags/ui/latest/demos/functional/#ui.datepicker
ok heres my code:

hi im trying to integrate a jquery datepicker to my codeigniter project.. the problem is that i cant get it to work .. my source code came from http://view.jquery.com/tags/ui/latest/demos/functional/#ui.datepicker ok heres my code:

查看:

<srcipt>
$("#formatted").datepicker({ 
    dateFormat: $.datepicker.ISO_8601, 
    showOn: "both", 
    buttonImage: "templates/images/calendar.gif", 
    buttonImageOnly: true 
});
</script>
<form action="add" method="post" class="form label-inline uniform" />
<input type="text" size="30" value="" id="formatted"/>
<input type="submit" class="btn btn-grey" value="Add User"/>
</form>
<script src="/assets/js/jquery/jquery-1.5.2.min.js"></script>

EDIT
i已添加所有js源,不工作

EDIT i already added all the js sources but its still not working

<script src="/assets/js/jquery/jquery-1.5.2.min.js"></script>
<script src="/assets/js/jquery/jquery-ui-1.8.12.custom.min.js"></script>
<script src="/assets/js/misc/excanvas.min.js"></script>
<script src="/assets/js/jquery/facebox.js"></script>
<script src="/assets/js/jquery/jquery.visualize.js"></script>
<script src="/assets/js/jquery/jquery.dataTables.min.js"></script>
<script src="/assets/js/jquery/jquery.tablesorter.min.js"></script>
<script src="/assets/js/jquery/jquery.uniform.min.js"></script>
<script src="/assets/js/jquery/jquery.placeholder.min.js"></script>
<script src="/assets/js/widgets.js"></script>
<script src="/assets/js/dashboard.js"></script>

EDIT
为datepicker创建了示例视图页面。仍然不能工作,即使图像的链接也无效。

EDIT created a sample view page for datepicker.. still not working even the link for the image is not working.

<html>
<head>
<script src="/assets/js/jquery/jquery-1.5.2.min.js"></script>
<script src="/assets/js/jquery/jquery-ui-1.8.12.custom.min.js"></script>
<script src="/assets/js/misc/excanvas.min.js"></script>
<script src="/assets/js/jquery/facebox.js"></script>
<script src="/assets/js/jquery/jquery.visualize.js"></script>
<script src="/assets/js/jquery/jquery.dataTables.min.js"></script>
<script src="/assets/js/jquery/jquery.tablesorter.min.js"></script>
<script src="/assets/js/jquery/jquery.uniform.min.js"></script>
<script src="/assets/js/jquery/jquery.placeholder.min.js"></script>

<script src="/assets/js/widgets.js"></script>
<script src="/assets/js/dashboard.js"></script>

</head>
<body>
<script>
$("#formatted").datepicker({ 
    dateFormat: $.datepicker.ISO_8601, 
    showOn: "both", 
    buttonImage: "http://pgoadmin.com/assets/images/calendar.gif", 
    buttonImageOnly: true 
});
</script>

<form>
<input type="text" size="30" value="" id="formatted"/>
</form>
</body>
</html>


推荐答案

您需要加载jQuery UI才能使用日期picker

You need to load in jQuery UI to use the date picker

https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.13/jquery-ui.js

不要忘记图片和CSS:

Dont forget the images and CSS as well:

http://jqueryui.com/下载

这篇关于datepicker codeigniter 2.2问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆