How to set the number of years displayed.

How to set the number of years displayed.

th3t1ckth3t1ck Posts: 216Questions: 35Answers: 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: 12,109Questions: 0Answers: 2,059
    Answer ✓

    Hi @th3t1ck ,

    You can use minDate for that:

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

    See example here.

    Cheers,

    Colin

  • th3t1ckth3t1ck Posts: 216Questions: 35Answers: 1

    Thank you Colin. That did the trick.

Sign In or Register to comment.