0

I've got a hybrid Android app with an HTML input:

<input type="date" id="expDate" name="expDate" placeholder="Select a date"/>

When I click on the input I only get years 2015 and below as per:

enter image description here

When I do the exact same thing in a Hybrid iOS app I get the years going out for decades.

Any ideas?

Guy Lowe
  • 2,115
  • 1
  • 27
  • 37

1 Answers1

0

I didn't realise it but we are using MobiScroll to do this and they have their own max and min dates you need to apply. See How can I set the maxDate for mobiscroll? for the answer but here is my implementation:

        picker.mobiscroll().date(  
        {
            theme: 'android-holo',
            display: 'bottom',
            mode: 'scroller',
            dateFormat: 'yy-mm-dd',
            minDate: new Date('2010,1,1'),
            maxDate: new Date('2030,1,1')
        });

Thanks to Akhil for pointng me in the right direction.

We only use this for Android and not iOS.

Community
  • 1
  • 1
Guy Lowe
  • 2,115
  • 1
  • 27
  • 37