[ 
http://issues.apache.org/jira/browse/TAPESTRY-690?page=comments#action_12332183 
] 

Vjeran Marcinko commented on TAPESTRY-690:
------------------------------------------

Fix is utterly simple. Inside DatePicker.js, in line 759, following should be 
added :

bits['s'] = date.getSeconds();
bits['ss'] = pad(date.getSeconds(),2);

bits['m'] = date.getMinutes();
bits['mm'] = pad(date.getMinutes(),2);

bits['H'] = date.getHours();
bits['HH'] = pad(date.getHours(),2);

And that's it. Now DatePicker will set units smaller than day inside it's text 
field, and we can use it for setting date and time :-)

WARNING: I believe that this would collide somewhat with fix for bug 
http://issues.apache.org/jira/browse/TAPESTRY-669

> DatePicker doesn't render time units smaller than day as zeros, inside HTML 
> text field
> --------------------------------------------------------------------------------------
>
>          Key: TAPESTRY-690
>          URL: http://issues.apache.org/jira/browse/TAPESTRY-690
>      Project: Tapestry
>         Type: Bug
>   Components: Framework
>     Versions: 4.0
>  Environment: 4.0-beta-9
>     Reporter: Vjeran Marcinko

>
> Although DatePicker cannot specify time units smaller than day, so sets them 
> to zero, it would be good to leave them as they are and render properly 
> inside HTML text field, meaning, only to affect time units larger than zero. 
> Tapestry would practicaly get component for setting date *and* time, which I 
> find terribly needed, in a way that user could pick date, and have to 
> manually set time.
> Currently, setting DatePicker with pattern such as following :
> <input jwcid="@DatePicker" value="ognl:fooTime" 
> translator="translator:date,pattern=dd/MM/yyyy HH:mm"/>
> Produces HTML text field populated with something like:
> 04/10/2005 HH:mm

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to