Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update API documentation to show correct behavior of passing params to methods through the pickadate interface #361

Closed
avramovic opened this issue Mar 6, 2014 · 1 comment
Labels
Milestone

Comments

@avramovic
Copy link

I'm looking at your docs and I can see the selected date as an object in my console, but whenever I try to read obj.year, obj.month or obj.date from my JS code, I get "undefined". I tried to call obj.getTime(), but it says getTime() is undefined, so this object is definitely not a JS Date object. If I try to dump the object members and methods, I get "too much recursion" error :(

Here's the fiddle: http://jsfiddle.net/Avram/4Jv2y/

I can get selected date as text, but I really need JS Date object.

@avramovic
Copy link
Author

I've got it. You can't call $(selector).pickadate('get', 'select'), you must call $(selector).pickadate('picker').get('select') :S

http://jsfiddle.net/Avram/4Jv2y/2/

@amsul amsul reopened this Apr 2, 2014
@amsul amsul added this to the v3.4.1 milestone Apr 2, 2014
@amsul amsul changed the title Get the Date object from picker Update API documentation to show correct behavior of passing params to methods through the pickadate interface Apr 2, 2014
@amsul amsul added the solved label Apr 13, 2014
@amsul amsul closed this as completed in a1a43e4 Apr 13, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants