jfmdev / ngComboDatePicker

Angular directive to select dates using combo boxes
Mozilla Public License 2.0
23 stars 20 forks source link

update to have year desc order #5

Closed armyofda12mnkeys closed 8 years ago

armyofda12mnkeys commented 8 years ago

defaults at "asc" order but can use "desc" with an attribute like so: ng-year-order="desc"

Note: needs the min.js created from whatever manual process you using to do that.

This is a nice add-on I think ... We have many old users for our pharma questionnaire so we start at 1910 but for most users its hard to scroll to the average year ... We also may have shared child and adult questionnaires, where 80% of people are filling out DOB for their child, but 20% of users may be filling out the DOB for themselves as adults ... so its easier to have 'newer' DOBs at the top for majority of users so dont have to scoll, and older DOBs closer to the bottom of dropdown for minority of people to scroll.

So this addition optionally allows year to go in desc order for those usability purposes mentioned above.

jfmdev commented 8 years ago

@armyofda12mnkeys Thanks for you contribution!

I have accepted your pull request, and I have updated the min file and added an example of how to use the ng-year-order attribute.