Doug
Doug

Reputation: 5266

mobiscroll does not enter datetime value in form input

The popup works, but every time I click the SET button, it seems to try to enter the value into the INPUT field and then weird stuff happens: The page flickers, almost like it is refreshed, and all of the values in the INPUTS are cleared. Then a text value in a page header gets repeated below itself. This repros in Firefox, Chrome, Safari. I've temporarily opened permissions on this page if someone would be kind enough to put an extra pair of eyeballs on this: http://bit.ly/MD8FVW

Here is my code:

        var now = new Date();

        $('#sessionTime').scroller({
            preset: 'datetime',
            minDate: new Date(now.getFullYear(), now.getMonth(), now.getDate()),
            theme: 'ios',
            display: 'modal',
            mode: 'scroller'
        });

        $('#sessionTime').click(function(){
            $('#sessionTime').scroller('show'); 
            return false;
        });

I'm also using iUI on the page to simulate an iOS look, but I don't know if that is interfering. Any ideas would be much appreciated!

Upvotes: 0

Views: 648

Answers (1)

Doug
Doug

Reputation: 5266

After removing many things and then slowly adding them back one by one, I found out that the culprit was:

<script type="application/x-javascript" src="iui/iui.js"></script>

I guess mobiscroll doesn't play nice with iUI. Luckily, I just need the iUI CSS and not the script on this particular page, so I can remove the script reference.

Upvotes: 1

Related Questions