jijopaulose / mobiscroll

Automatically exported from code.google.com/p/mobiscroll
0 stars 0 forks source link

clickpick mode with maxdate #94

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?

Create a scroller with mode = clickpick and maxDate 
i.e

 $('#click-pick-date-with-max').scroller({
                preset: 'date',
                maxDate: new Date(now.getFullYear() + 5, now.getMonth(), now.getDate()),
                mode: 'clickpick'
            });

 <input id="click-pick-date-with-max" name="click-pick-date-with-max" />

What is the expected output? What do you see instead?

When I click the +(plus) image for the year first time it goes till 17 and goes 
back to 12 as expected but when you click on +(plus) again it 
won't go back to 12 after 17 it carries on.

I am expecting it to scroll to 12 after 17 (n) number of times.

What version of the product are you using? On what operating system?

mobiscroll.core-2.0rc3.js

Please provide any additional information below.

Regards

Salim

Original issue reported on code.google.com by salimgbe...@gmail.com on 24 May 2012 at 1:22

Attachments:

GoogleCodeExporter commented 9 years ago
JSFiddle for the above bug

http://jsfiddle.net/YaDHK/

Original comment by salimgbe...@gmail.com on 24 May 2012 at 1:32

GoogleCodeExporter commented 9 years ago
You did not specify the minDate or startYear option, and by default startYear 
goes back to current year - 100. So when you're on 17 and press the + button, 
it goes to 1912, not 2012 (see the popup header). If you expect 2012, set the 
startYear option (or minDate, if you want to specify the month and date also)

Your example updated:
http://jsfiddle.net/YaDHK/1/

Original comment by diosla...@gmail.com on 25 May 2012 at 12:29