How to set the number of years displayed.

How to set the number of years displayed.

th3t1ckth3t1ck Posts: 228Questions: 37Answers: 1

I have a date that you can pick a previous year from but it doesn't show years far enough back. So for instance if I want to enter someone's birth year and they were born in 1960 how can I have the date picker show that many years back in time?

This question has an accepted answers - jump to answer

Answers

  • colincolin Posts: 15,112Questions: 1Answers: 2,583
    Answer ✓

    Hi @th3t1ck ,

    You can use minDate for that:

                  opts: {
                    minDate: new Date('1900/01/01')
                  }
    

    See example here.

    Cheers,

    Colin

  • th3t1ckth3t1ck Posts: 228Questions: 37Answers: 1

    Thank you Colin. That did the trick.

This discussion has been closed.