简体   繁体   English

jQuery日期和时间选择器

[英]jQuery Date and TimePicker

I am trying to use the date and time picker located at 我正在尝试使用位于的日期和时间选择器

http://razum.si/jQuery-calendar/TimeCalendar.html http://razum.si/jQuery-calendar/TimeCalendar.html

However this picker works only if the jquery-ui.js is not included. 但是,仅当不包括jquery-ui.js时,此选择器才有效。 It looks like it conflicts with something with the base jquery-ui.js. 看起来与基本的jquery-ui.js冲突。

The jquery core api is required. jQuery核心api是必需的。

Any insight would be helpful. 任何见解都会有所帮助。

thanks in advance. 提前致谢。

The code is 该代码是

     <script type="text/javascript" src="jquery.js"></script> 
    <script type="text/javascript" src="jquery-calendar.js"></script> 
    <link rel="stylesheet" type="text/css" href="jquery-calendar.css" /> 
    <link rel="stylesheet" type="text/css"  href="styles.css" /> 
    <script type="text/javascript"> 
    //<![CDATA[
        $(document).ready(function (){ 
            $("#calendar1").calendar();

        });
    //]]>
    </script> 

and the code to bring the popup on focusing on input field is 而使弹出窗口专注于输入字段的代码是

 <input type="text" id="calendar1" class="calendarFocus"/>

The script can be seen by looking into the source of the page, for which link is given above. 通过查看页面的源代码可以看到脚本,上面提供了链接。 (I am not able to post more links here, as stack overflow is not allowing it). (我无法在此处发布更多链接,因为堆栈溢出不允许这样做)。

I'm not familiar with this plugin. 我对这个插件不熟悉。 But I override jQuery UI's autocomplete with the Pengoworks one by placing the script call after the UI call: 但是我通过将脚本调用放在UI调用之后,用Pengoworks重写了jQuery UI的自动完成功能:

<script type="text/javascript" src="/js/jquery.js"></script>
<script type="text/javascript" src="/js/jquery-ui-1.7.3.custom.min.js"></script>
<script type="text/javascript" src="/js/jquery.autocomplete.js"></script>

Hard to say without seeing your code, 不看代码很难说,

However if u continue to have problems with this date picker.. I have always used THIS one, really easy and looks great too. 但是,如果您在此日期选择器上仍然遇到问题。.我一直使用此工具 ,真的很简单,而且看起来也很棒。

You can try to download the jquery UI with only the modules that you need. 您可以尝试仅使用所需模块下载jquery UI。 (So without the datepicker). (因此没有日期选择器)。

I'm not sure what you mean. 我不确定你是什么意思。 You use jQuery in you page and you want to use the razum timecalender, but that one clashes with jquery? 您在页面中使用jQuery,并且想要使用razum timecalender,但是那与jQuery冲突吗?

Maybe use the jQuery UI version? 也许使用jQuery UI版本? Probably easier to implement because you already have jQuery. 可能更容易实现,因为您已经有了jQuery。 see here 看这里

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM