jQuery datepicker不起作用,日期框不出现 [英] jquery datepicker not working ,date box not appearing
问题描述
我正在尝试将jQuery dtepciker添加到Grails(Intelli J)中的应用程序中,但未显示日期选择器
i am trying to add jquery dtepciker to my application in Grails(Intelli J) but its not showing the datepicker
这是我的html代码
<input type="text" id="datepicker" name="datepicker" style="width:275px" value="enter date">
这是我的JavaScript代码
here is my javascript code
$(document).ready(function(){
$("#datepicker").datepicker();
});t
但是当我单击文本框:datepicker时,什么都没有发生,如果您可以告诉我我错了,我是jquery/jaa脚本的新手,我是否需要在我的应用程序中安装jquery datepicker插件,如果可以,,如何安装
but when i click on the text box : datepicker nothing happens , i am new to jquery/ jaa script if you could tell me where i'm wrong , do i need to have the jquery datepicker plugin in my application and if yes , how to install that
此外,当我将鼠标悬停在此.datepicker()上时;它说未解决的函数或方法datepicker()"
Also when i mouseover this .datepicker(); it says "unresolved function or method datepicker()"
谢谢
推荐答案
是的,您需要具有jquery和jquery-ui datepicker插件才能使其正常工作.您可以从 http://jqueryui.com/download
Yes you need to have jquery and jquery-ui datepicker plugin to make this work. You can download the plugin from http://jqueryui.com/download
下载js并将其包含在您的页面中.
Download the js and include in your page.
还有一件事情, $("datepicker").datepicker();
应该是 $(#datepicker").datepicker();
One more thing, $("datepicker").datepicker();
should be $("#datepicker").datepicker();
还可以查看 jQuery DatePicker未加载,这可能会有所帮助.
Also check out jQuery DatePicker not Loading, it might help.
这篇关于jQuery datepicker不起作用,日期框不出现的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!