struts-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Giovanni Azua Garcia (JIRA)" <j...@apache.org>
Subject [jira] Commented: (WW-2353) datetimepicker time dojo widget won't let entering minutes freely
Date Tue, 14 Oct 2008 16:40:38 GMT

    [ https://issues.apache.org/struts/browse/WW-2353?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=44826#action_44826
] 

Giovanni Azua Garcia commented on WW-2353:
------------------------------------------

I think I found the problem, seems it was intended to be constrained to multiples of 5. By
applying the following patch the user would be able to enter minutes freely but I will be
testing it now ...

Index: plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/struts_dojo.js
===================================================================
--- plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/struts_dojo.js (revision
704566)
+++ plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/struts_dojo.js (working
copy)
@@ -16477,9 +16477,9 @@
 var hour=_dbf[0];
 var isAm=_dbf[1];
 var _dc2=this.time.getMinutes();
-var _dc3=parseInt(_dc2/5);
+var _dc3=parseInt(_dc2);
 this.onSetSelectedHour(this.hourIndexMap[hour]);
-this.onSetSelectedMinute(this.minuteIndexMap[_dc3]);
+this.onSetSelectedMinute(_dc3);
 this.onSetSelectedAmPm(isAm);
 }else{
 this.onSetSelectedAnyTime(); 

> datetimepicker time dojo widget won't let entering minutes freely
> -----------------------------------------------------------------
>
>                 Key: WW-2353
>                 URL: https://issues.apache.org/struts/browse/WW-2353
>             Project: Struts 2
>          Issue Type: Bug
>          Components: Plugin - Dojo Tags
>         Environment: Fedora 6, Tomcat 6.x, Firefox 1.5.x
>            Reporter: Giovanni Azua Garcia
>            Priority: Minor
>             Fix For: Future
>
>
> Having a form definition like the one below, the onTime datetimepicker would not allow
the user to enter any time i.e. freely writing a time.
> Use case:
> - click the datetimepicker time control button
> - select the "any" time option
> - in the text field enter a non multiple of 5 minutes e.g. 08:34
> When the control loses focus it automatically casts the minutes to 08:30 multiple of
5.
> <%@ page contentType="text/html; charset=UTF-8"%>
> <%@ taglib prefix="s" uri="/struts-tags"%>
> <%@ taglib prefix="sx" uri="/struts-dojo-tags" %>
> <s:form id="formSimulation" action="%{targetAction}" method="post" theme="%{currentTheme}">
> <sx:datetimepicker label="On Time" tooltip="Provide the On Time" name="onTime" type="time"
toggleType="fade" toggleDuration="500" />
> <!-- ... etc -->
> <s:submit value="%{buttonLabel}" align="center"/>
> </s:form>
> This same behavior may be reproduced from the showcase example application.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message