首先要引入struts2-dojo-plugin-2.2.1.jar
在jsp中引入tag:
<%@ taglib prefix="s" uri="/struts-tags" %>
<%@ taglib prefix="sx" uri="/struts-dojo-tags" %>
在<head></head>中加入<sx:head />,<SX:HEAD/>的作用是自动导入struts2 dojo的js和css
<head>
<base href="<%=basePath%>">
<sx:head />
<title>用户注册</title>
</head>
body中使用datetimepicker标签
<sx:datetimepicker name="birthday" toggleType="explode" toggleDuration="400"
label="出生日期" displayFormat="yyyy-MM-dd" />