简体   繁体   English

jQuery UI datepicker在asp.net上没有主题

[英]jquery ui datepicker no theme on asp.net

I have a jquery datepicker in an asp.net web form, it is working but has no style at all, I can only see the numbers floating over the page. 我在asp.net网络表单中有一个jquery datepicker,它正在工作,但根本没有样式,我只能看到页面上漂浮的数字。

I have the following scripts in the master page: 我在母版页中有以下脚本:

<script src="Scripts/jquery-ui-1.11.3.min.js" type="text/javascript"></script>

I included the jquery-ui using nuget, so I have the themes very similar to 我使用nuget包含了jquery-ui,所以我的主题非常类似于 在此处输入图片说明

The date picker is associated to the control: 日期选择器与控件关联:

<div>Date:&nbsp;<asp:TextBox ID="txtDate" runat="server"></asp:TextBox>&nbsp;</div>

With the script: 使用脚本:

$(document).ready(function() {
            $("#<%=txtDate.ClientID%>").datepicker({ dateFormat: 'd/m/yy' });
        });

The result is as I mentioned early the calendar without any style. 结果就像我在日历中提到的那样,没有任何样式。

What I am missing to have the datepicker with some style (theme)? 我缺少具有某些样式(主题)的日期选择器吗? Thank you 谢谢

Here's what I have referenced. 这是我所引用的。 The datepicker works fine - apart from when you mouseover the arrows and the little white triangle goes gray - and can't be seen. 日期选择器工作正常-除了将鼠标悬停在箭头上并且白色小三角形变灰之外-并且看不到。 Must have a little graphic missing I guess. 我猜必须缺少一些图形。

<script type="text/javascript" src="js/jquery-1.8.3.js"></script>
<link rel="stylesheet" type="text/css" href="js/jquery-ui.css"/>
<script type="text/javascript" src="js/jquery-ui.js"></script>

thanks to @Martin Smellworse advice, based on the the files in my project I included: 感谢@Martin Smellworse的建议,基于我项目中的文件,我包括了:

<link href="Content/themes/base/all.css" rel="stylesheet" type="text/css" />

And worked 和工作

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

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