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?

1
  • 1
    did you tried adding max property to date in your html?
    – Akhil
    Sep 26, 2014 at 6:23

1 Answer 1

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.