SirGaga / mobiscroll

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

Setting the maxDate option does not affect a date scroller #112

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Create a mobiscroll date control with a maxDate set
2. Call $('#container').scroller('option', 'maxDate', newMaxDate) 
3. Open the controll

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

I would expect the new max date to have an effect. Instead the old one is still 
applied.

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

2.0.3

Please provide any additional information below.

Original issue reported on code.google.com by marcin.floryan on 30 Oct 2012 at 3:37

GoogleCodeExporter commented 9 years ago
It works in 2.1
Example here: 
http://jsfiddle.net/dioslaska/pHtUF/

Original comment by diosla...@gmail.com on 31 Oct 2012 at 6:34

GoogleCodeExporter commented 9 years ago
Still it does not work if you try to change both the min and max dates.

See this example:
http://jsfiddle.net/pHtUF/3/

Original comment by marcin.floryan on 1 Nov 2012 at 2:33

GoogleCodeExporter commented 9 years ago

Original comment by diosla...@gmail.com on 1 Nov 2012 at 2:59

GoogleCodeExporter commented 9 years ago
Thank you for the bug report, I identified the problem and will be fixed for 
the next release.
A workaround for this (on 2.1) to update multiple options at once:

$('#container').scroller('option', { minDate: new Date(2011,05,10), maxDate: 
new Date(2011,10,10) });

Original comment by diosla...@gmail.com on 2 Nov 2012 at 9:17

GoogleCodeExporter commented 9 years ago
Thanks. The workaround works fine for us. Might be worth putting this into docs 
as a legitimate example I suppose.

Original comment by marcin.floryan on 6 Nov 2012 at 3:14

GoogleCodeExporter commented 9 years ago
Fixed in 2.2

Original comment by diosla...@gmail.com on 26 Nov 2012 at 1:05