birthdaypicker icon indicating copy to clipboard operation
birthdaypicker copied to clipboard

accessing the hidden date

Open lookfirst opened this issue 13 years ago • 4 comments

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)

lookfirst avatar Nov 28 '11 23:11 lookfirst

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?

lookfirst avatar Nov 28 '11 23:11 lookfirst

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.

lookfirst avatar Nov 29 '11 00:11 lookfirst

You are welcome to update the code if you're interested. I just don't have much time these days.

abecoffman avatar Mar 04 '12 18:03 abecoffman

I added you as a collaborator on this project. Will that allow you to merge your code in yourself?

abecoffman avatar Mar 04 '12 18:03 abecoffman