google-code-export / wiquery

Automatically exported from code.google.com/p/wiquery
MIT License
1 stars 1 forks source link

Datepickeryearrange absolute with yearTo setted to 0 not work #210

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1.new DatePickerYearRange(10, 0, true);

What is the expected output? What do you see instead?
Expected output is .datepicker({yearRange: '-120:+0'})
Instead it was .datepicker({yearRange: '-120:0'})

yearRange with yearTo without plus or minus sign seem not work on jquery 
date-picker. Dont know if it is jquery date-picker plugin bug or wiquery bug.

What version of the product are you using? On what operating system?
Wicket 1.2.3. Not tried with 1.5 version

Please provide any additional information below.

the method DatePickerYearRange.generateRangeFormat can became

     private String generateRangeFormat(Short value, DatePickerYearRangeControl control)
        {
               String preStr = value > 0 ? "+" : ""; 

               if (control == DatePickerYearRangeControl.RELATIVE_SELECTED_YEAR)
                {
                        preStr = "c" + preStr;
                }

                return preStr + value.toString();
        }

Original issue reported on code.google.com by fabio.bo...@gmail.com on 21 Sep 2011 at 11:19

GoogleCodeExporter commented 9 years ago
have you tried using 1.2.4?

Original comment by hielke.hoeve on 26 Oct 2011 at 6:59

GoogleCodeExporter commented 9 years ago

Original comment by hielke.hoeve on 10 Nov 2011 at 8:16

GoogleCodeExporter commented 9 years ago
make sure you use DatePickerYearRangeControl.RELATIVE_SELECTED_YEAR otherwise 
the + char is not prepended.

Original comment by hielke.hoeve on 2 Dec 2011 at 4:27