birthdaypicker
birthdaypicker copied to clipboard
accessing the hidden date
I just realized that it would be really awesome if I could more easily access the hidden date from within the birthdaypicker instance itself instead of having to select the data from the hidden input field.
bdaypicker = $('foo').birthdaypicker(options)
Date date = bdapypicker.getDate()
and/or:
date = bdapypicker.getDateString() date is then in: 'yyyy-mm-dd' format (or whatever the date format is from the options)
Looking at the code a bit further, I see that you've done this.each(), which returns a Jquery object, so the above syntax might be a bit more difficult. I kind of question the validity of using this.each() because that would simply bind a bunch of pickers to a bunch of DOM objects, but with all the same settings... so how would the fiendName/fieldId work in that case?
Ok, looking at the design of timepicker (http://fgelinas.com/code/timepicker) and datepicker (part of jquery ui), I wonder if birthdaypicker wouldn't benefit from a similar treatment.
You are welcome to update the code if you're interested. I just don't have much time these days.
I added you as a collaborator on this project. Will that allow you to merge your code in yourself?