diff --git a/apps/showcase/src/main/webapp/ajax/datepicker/index.jsp b/apps/showcase/src/main/webapp/ajax/datepicker/index.jsp index 96e79b374..b85353390 100644 --- a/apps/showcase/src/main/webapp/ajax/datepicker/index.jsp +++ b/apps/showcase/src/main/webapp/ajax/datepicker/index.jsp @@ -12,7 +12,7 @@ This should have the month label all on one line (problem in IE) appears fine in FF though. - +

A calendar in your locale, or the closest thing to it we currently provide

diff --git a/core/src/main/resources/org/apache/struts2/static/dojo/struts/widget/__package__.js b/core/src/main/resources/org/apache/struts2/static/dojo/struts/widget/__package__.js index a567721fd..1ecffb0bd 100644 --- a/core/src/main/resources/org/apache/struts2/static/dojo/struts/widget/__package__.js +++ b/core/src/main/resources/org/apache/struts2/static/dojo/struts/widget/__package__.js @@ -2,6 +2,7 @@ dojo.kwCompoundRequire({ common: ["struts.widget.Bind", "struts.widget.BindDiv", "struts.widget.BindAnchor", - "struts.widget.ComboBox"] + "struts.widget.ComboBox", + "struts.widget.DatePicker"] }); dojo.provide("struts.widget.*"); diff --git a/core/src/main/resources/template/ajax/dojoRequire.js b/core/src/main/resources/template/ajax/dojoRequire.js index b3d267602..28d79d269 100644 --- a/core/src/main/resources/template/ajax/dojoRequire.js +++ b/core/src/main/resources/template/ajax/dojoRequire.js @@ -9,5 +9,7 @@ dojo.require("struts.widget.Bind"); dojo.require("struts.widget.BindDiv"); dojo.require("struts.widget.BindAnchor"); dojo.require("struts.widget.ComboBox"); +dojo.require("struts.widget.DatePicker"); +dojo.require("struts.widget.TimePicker"); dojo.require("dojo.widget.Editor"); dojo.hostenv.writeIncludes(); // not needed, but allows the Venkman debugger to work with the includes diff --git a/core/src/main/resources/template/simple/datepicker.ftl b/core/src/main/resources/template/simple/datepicker.ftl index 1bd30dd4d..b760d92f8 100644 --- a/core/src/main/resources/template/simple/datepicker.ftl +++ b/core/src/main/resources/template/simple/datepicker.ftl @@ -1,19 +1,24 @@ - - -
- id="${parameters.id?html}"<#rt/> - - <#if parameters.value?if_exists != ""> - value="${parameters.value?html}"<#rt/> - - <#if parameters.language?if_exists != ""> - lang="${parameters.language?html}"<#rt/> + + value="${parameters.nameValue?html}"<#rt/> <#if parameters.name?if_exists != ""> name="${parameters.name?html}"<#rt/> + id="struts_${parameters.name?html}"<#rt/> + +> +
+ id="${parameters.id?html}"<#rt/> + + <#if parameters.name?if_exists != ""> + inputId="struts_${parameters.name?html}"<#rt/> + + <#if parameters.nameValue?if_exists != ""> + value="${parameters.nameValue?html}"<#rt/> + + <#if parameters.language?if_exists != ""> + lang="${parameters.language?html}"<#rt/> <#if parameters.displayWeeks?if_exists != ""> displayWeeks="${parameters.displayWeeks?html}"<#rt/> diff --git a/core/src/main/resources/template/simple/timepicker.ftl b/core/src/main/resources/template/simple/timepicker.ftl index 982a4394d..dde029059 100644 --- a/core/src/main/resources/template/simple/timepicker.ftl +++ b/core/src/main/resources/template/simple/timepicker.ftl @@ -1,13 +1,21 @@ - - -
+ value="${parameters.nameValue?html}"<#rt/> + + <#if parameters.name?if_exists != ""> + name="${parameters.name?html}"<#rt/> + id="struts_${parameters.name?html}"<#rt/> + +> +
id="${parameters.id?html}"<#rt/> - <#if parameters.value?if_exists != ""> - storedTime="todayT${parameters.value?html}"<#rt/> + <#if parameters.name?if_exists != ""> + inputId="struts_${parameters.name?html}"<#rt/> + + <#if parameters.nameValue?if_exists != ""> + storedTime="${parameters.nameValue?html}"<#rt/> <#if parameters.language?if_exists != ""> lang="${parameters.language?html}"<#rt/> diff --git a/core/src/main/resources/template/xhtml/timepicker.ftl b/core/src/main/resources/template/xhtml/timepicker.ftl index 8b0fa7c65..3a905d4b4 100644 --- a/core/src/main/resources/template/xhtml/timepicker.ftl +++ b/core/src/main/resources/template/xhtml/timepicker.ftl @@ -1,2 +1,4 @@ +<#include "/${parameters.templateDir}/${parameters.theme}/controlheader.ftl" /> <#include "/${parameters.templateDir}/simple/timepicker.ftl" /> +<#include "/${parameters.templateDir}/xhtml/controlfooter.ftl" />