[ 
https://issues.apache.org/struts/browse/WW-2904?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Musachy Barroso updated WW-2904:
--------------------------------

    Component/s: Plugin - Dojo Tags

> Problem with <s:datetimepicker ../> on the days following the last month of 
> the year (or days before the first month)
> ---------------------------------------------------------------------------------------------------------------------
>
>                 Key: WW-2904
>                 URL: https://issues.apache.org/struts/browse/WW-2904
>             Project: Struts 2
>          Issue Type: Bug
>          Components: Plugin - Dojo Tags
>    Affects Versions: 2.0.11.1, 2.0.11.2, 2.0.12, 2.0.13, 2.0.14
>            Reporter: Jérémie Quinet
>
> When choosing a day that is after the 12/31 of the current year or before the 
> 01/01 the month used by the datetimepicker taglib is not the correct one.
> I've seen the answer to the WW-2473 issue and understood it's fixed in the 
> 2.1.x versions but i think i'm not the only one that is currently using only 
> GA and would like to see this bug fixed for the 2.0.X branch.
> After checking the problem i've found it's in the DatePicker.js dojo file, 
> the test to check if the day to display is before or after the current month 
> is incorrect (line 243) :
> var curClass = 
> (nextDate.getMonth()<this.curMonth.getMonth())?'previous':(nextDate.getMonth()==this.curMonth.getMonth())?'current':'next';
> it doesn't test if the day is on the next  (or previous) year.
> Checking on the last 0.4.X dojo version available (0.4.3) this problem is 
> fixed (i don't know which dojo version struts 2.0.14 currently use), the line 
> is replaced with :
> var curClass = (nextDate.getMonth() != this.curMonth.getMonth() && 
> Number(nextDate) < 
> Number(this.curMonth))?'previous':(nextDate.getMonth()==this.curMonth.getMonth())?'current':'next';
> Couldn't it be possible to use the 0.4.3 version of dojo for the next 2.0.X 
> version of Struts ?
> Thanks.

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

Reply via email to