sturts2的<s:datetimepicker/>时间显示有错
<s:head />
<s:datetimepicker label="开始时间" name="start" type="time" value="13:00"/>
这样显不了时间
把
<s:head />
改为
<s:head theme="ajax" />
就可以正常显示时间了,
但默认的是显示中文的时间的,
还要添加
<s:datetimepicker label="开始时间" name="start" type="time" value="13:00" language="en-us"/>
language="en-us"就显示正常
<script type="text/javascript">
// Dojo configuration
djConfig = {
baseRelativePath: "/polabs/struts/dojo",
isDebug: false,
bindEncoding: "utf-8",
debugAtAllCosts: true // not needed, but allows the Venkman debugger to work with the includes
};
</script>
<script type="text/javascript"
src="/polabs/struts/dojo/dojo.js"></script>
<script type="text/javascript"
src="/polabs/struts/simple/dojoRequire.js"></script><script type="text/javascript"
src="/polabs/struts/ajax/dojoRequire.js"></script>
<script type="text/javascript"
src="/polabs/struts/CommonFunctions.js"></script>
2.页面中的日期控件和输入框没有出现
我的页面代码是:
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<s:head theme="ajax"/>
</head>
<body>
<s:datetimepicker label="ddd" name="dd" type="time"></s:datetimepicker>
</body>
</html>
我用的是struts2 2.0.1版本
2 楼 lixw188 2008-12-11 出现dojo未定义时,只要在<head></head>中加入<s:head theme="ajax"/>就行了[color=red][/color][size=medium][/size]