Mercurial > public > sg101
changeset 77:d5eed0a91a05
#24 - Make the default date for a birthday today - 30 years. This allows you to select any month with the picker if the field is initially blank.
author | Brian Neal <bgneal@gmail.com> |
---|---|
date | Fri, 10 Jul 2009 23:56:02 +0000 |
parents | eecbd00e092a |
children | 4edfea7f8620 |
files | media/js/bio.js |
diffstat | 1 files changed, 1 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/media/js/bio.js Fri Jul 10 23:50:06 2009 +0000 +++ b/media/js/bio.js Fri Jul 10 23:56:02 2009 +0000 @@ -5,6 +5,7 @@ $('#id_birthday').datepicker({changeMonth: true, changeYear: true, dateFormat: 'yy-mm-dd', + defaultDate: '-30y', minDate: new Date(1909, 0, 1), maxDate: new Date(), yearRange: '-100:+0'});