sumithamith / mobiscroll

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

Verified bug with setDate #93

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Create a 'datetime' preset scroller then a 'date' preset scroller
2. Execute setDate during onShow of both scrollers
3. setDate only sets the date for the 'datetime' preset scroller
4. order of executing the scroller() commands is important. if the datetime is 
instantiated last it will work correctly. 

What is the expected output? What do you see instead?
Date and time should be set

What version of the product are you using? On what operating system?
2.0rc1 through 2.0rc3 All

Please provide any additional information below.

Here's the fiddle for this example: http://jsfiddle.net/xp6HV/
Run the fiddle and you'll see if you click on the second input textbox, only 
the date is set even though a full date and time is specified. The time portion 
defaults to current time.

Now, cut the $('#testDate')... section and past at the top. Run it again. 
Everything works ok now.

Now look at this fiddle: http://jsfiddle.net/xp6HV/1/

The only difference is we have a third text box, with a scroller last set as 
datetime, and everything works ok. 

I debugged this pretty far and it would appear each successive call to 
scroller() modifies some global variable contained within the mobiscroll 
closure. Whatever the last preset that was set affects what the internal calls 
to getInst returns. Specifically, line 330 of datetime-2.0rc3.js. That call the 
getInst returns what looks like an incomplete reference to the instance.

Original issue reported on code.google.com by scott.mc...@gmail.com on 24 May 2012 at 4:48

GoogleCodeExporter commented 9 years ago
Thanks for the detailed report.
It will be fixed for 2.0 final

Original comment by diosla...@gmail.com on 24 May 2012 at 5:58

GoogleCodeExporter commented 9 years ago
Thx!

Original comment by scott.mc...@gmail.com on 24 May 2012 at 6:08

GoogleCodeExporter commented 9 years ago
Fixed in 2.0

Original comment by diosla...@gmail.com on 25 May 2012 at 2:22