0

I am using http://vitalets.github.io/bootstrap-datepicker/ bootstrap datepicker for user to select there date of birth, all user are above 60, I want to allow them to select year first, then month and date, this plugin support year first, but its showing 2014 when datapicker if focus, I want default selected to be 1950,

 <script> $(document).ready(function () { var currDate = 1; var currMonth = 1; var currYear = 1950; var dateStr = new Date(currMonth + "/" + currDate + "/" + currYear); $("#DOB").datepicker({ viewMode: 'years', startDate : dateStr }); }); </script> 

1 Answer 1

1

There is an option available in the provided link itself-> startView

Syntax: startView : 'decade'

Description :

The view that the datepicker should show when it is opened. Accepts values of 0 or 'month' for month view (the default), 1 or 'year' for the 12-month overview, and 2 or 'decade' for the 10-year overview.

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.