为什么我的Datepicker看起来很奇怪? [英] WHY my Datepicker looks so weired?

查看:135
本文介绍了为什么我的Datepicker看起来很奇怪?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用jquery UI.我下载了所有内容并按照说明进行操作,并在html中添加了此类代码:

I'm trying to use jquery UI. I download everything and follow the instruction, I add such code in my html:

<link type="text/css" href="/css/ui-lightness/jquery-ui-1.8.20.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.20.custom.min.js"></script>
<script type="text/javascript">
     $(function() {
         $( "#id_myDate" ).datepicker({
             inline: true
         });
     });
</script>
.....
<div>Date: <input type="text" id="id_myDate" name="deadLine"></div>

当我加载此页面时,Datepicker看起来很奇怪.

When I load this page, the Datepicker looks so weired.

怎么了?当我下载jquery UI时,我打开index.html,并且一切正常(包括datepicker),但是当我将其放入我的应用程序时,它看起来很糟糕.

What's wrong? When I download jquery UI, I open the index.html and everything works fine(including datepicker), but when I put it into my app, it looks bad.

顺便说一句.我的浏览器是Chrome(我也在firefox中对此进行了测试,同样的问题),并且我正在使用python开发Google Appengine应用.

BTW. My browser is Chrome(I test this in firefox too, same problem), and I'm working on a google appengine app in python.

谢谢.

------------------------ 编辑 --------------- ------------

------------------------EDIT---------------------------

对不起.因为这是一个Google Appengine,所以我应该配置我的静态文件,例如js和css.我忘了在app.yaml中配置我的CSS文件.现在,我将其添加到yaml文件中:

I'm sorry. Because this is a google appengine, so I should configure my static files, such as js and css. I forget to configure my css files in app.yaml. Now, I add this in yaml file:

- url: /js
static_dir: js

- url: /css
static_dir: css

js和css是这些文件所在目录的名称. 非常感谢你.

js and css are the name of dir where these files located. Thank you very much.

推荐答案

<link rel="stylesheet" href="//code.jquery.com/ui/1.11.4/themes/smoothness/jquery-ui.css">

将此代码添加到html的头部

add this code to the head of your html

这篇关于为什么我的Datepicker看起来很奇怪?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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