lopespm / mobiscroll

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

not accepting dates from ('setDate') #44

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1.
<script type="text/javascript">
        var foo = new Date(2009, 7, 7);
    $(document).ready(function () {           
        $('#abreiseInput').scroller({
            dateFormat: 'dd.mm.yyyy',
            dateOrder: 'ddmmyy',
            theme: 'android',
            mode: 'clickpick'

        })
        //hier preset date setzen
        $('#abreiseInput').scroller('setDate', foo, true);
    })
</script>

2.open mobiscroll by clicking into the input

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

the datepicker is supposed to open with the foo date.
instead the value of the input is changed to foo but mobiscroll opens with the 
current date.

What version of the product are you using? On what operating system?
1.5.1 tested with firefox

Please provide any additional information below.

Original issue reported on code.google.com by mail4kru...@gmail.com on 12 Oct 2011 at 1:22

GoogleCodeExporter commented 8 years ago

Original comment by diosla...@gmail.com on 17 Oct 2011 at 5:54

GoogleCodeExporter commented 8 years ago
Well... it does not appear in the documentation, but you must use 'yy' for 4 
digit, and 'y' for 2 digit year format in your dateFormat option, like in the 
jquery UI datepicker. In your case change 'dd.mm.yyyy' to 'dd.mm.yy' and your 
problem is gone.

Original comment by diosla...@gmail.com on 17 Oct 2011 at 8:33