Search code examples
htmljquery-mobilemobiscroll

Mobiscroll with JQuery Mobile: Year part not being recognized


I am having problems getting Mobiscroll to recognize the year part of a date. See image below:

Mobiscroll year

JS

$('.datepicker').scroller({
            preset: 'date',
            theme: 'jqm',
            display: 'bottom',
            mode: 'scroller',
            dateOrder: 'yyyy-mm-dd',
            dateFormat: 'yyyy-mm-dd'
        });

Is this a bug? And what do I do to make Mobiscroll recognize the given year?


Solution

  • "yyyy" is not supported as a date format. Use "yy" for four digit year.

    http://docs.mobiscroll.com/datetime-preset