简体   繁体   English

为什么在文本框下没有显示我的日历

[英]Why is it not showing me calendar under the textbox

I have copied this code from a website http://www.aspdotnet-suresh.com/2012/04/jquery-dropdownlist-selection-for.html and its not showing me the desired output, I'm Naive at this but the calendar is not visible below the textbox which should as per the code. 我已从网站http://www.aspdotnet-suresh.com/2012/04/jquery-dropdownlist-selection-for.html复制了此代码,但未向我显示所需的输出,我对此很幼稚,但根据代码,日历在文本框下方不可见。

 <!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta charset="utf-8"/>
<title>jQuery UI Datepicker - Default functionality</title>
<link type="text/css" href="css/ui-lightness/jquery-ui-1.8.19.custom.css" rel="stylesheet" />
<script type="text/javascript" src="js/jquery-1.7.2.min.js"></script>
<script type="text/javascript" src="js/jquery-ui-1.8.19.custom.min.js"></script>
<script type="text/javascript">
$(function () {
    $("#txtDate").datepicker({
        changeMonth: true,
        changeYear: true,
        yearRange: '1970:2012'
    });
});
</script>
<style type="text/css">
.ui-datepicker { font-size:8pt !important}
</style>
</head>
<body>
<form id="form1" runat="server">
<div class="demo">
<b>Date:</b> <asp:TextBox ID="txtDate" runat="server"/>
</div>
</form>
</body>
</html>

You can also set up calendar by using ajax calendar extender.. 您还可以使用ajax日历扩展程序设置日历。

<asp:CalendarExtender ID="txtDate_CalendarExtender" runat="server" 
Enabled="True" TargetControlID="txtDate" Format="dd/MMM/yyyy">
</asp:CalendarExtender>

根据您的说法,您首先复制了代码,因此请检查您的应用程序是否包含js文件夹

Make sure that your website project includes the reference files in your project 确保您的网站项目中包含参考文件

  1. css/ui-lightness/jquery-ui-1.8.19.custom.css css / ui-lightness / jquery-ui-1.8.19.custom.css
  2. js/jquery-1.7.2.min.js js / jquery-1.7.2.min.js
  3. js/jquery-ui-1.8.19.custom.min.js js / jquery-ui-1.8.19.custom.min.js

If not you can download the same from jquery site and include same in your project or provide http path for reference files 如果不是,您可以从jquery站点下载相同的文件并将其包含在您的项目中,或者提供参考文件的http路径

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

相关问题 Ajax Calendar Extender提示不显示文本框 - Ajax Calendar Extender tip NOT showing with a textbox WPF日期选择器未在文本框旁边显示日历 - WPF datepicker not showing calendar next to textbox Calendar Extendar没有显示一个文本框的开始日期到另一个文本框的选定日期 - Calendar Extendar is not showing Starting Date of one textbox to selected date of another textbox 为什么/如何使我能够在Calendar控件中选择多天? - Why/how does this enable me to select multiple days in a Calendar control? 为什么我的 DataContext 会因为绑定而从我下面切换出去? - Why is my DataContext getting switched out from under me for a binding? 为什么名称不显示在基于组合框所选ID的文本框中 - Why Name not showing in textbox based on combobox selected id Google日历活动未显示在日历中 - Google Calendar Event Not Showing in Calendar 当我访问中继器中的TextBox时,为什么TextBox值显示为Null - Why TextBox value is showing Null when i access TextBox that is inside a Repeater 为什么Visual Studio会向我显示这么多无误? - Why is visual studio showing me so many non-errors? 为什么我的输入总是显示这个 data-val-required? - why is my input always showing me this data-val-required?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM