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

Chainable methods #722

Merged
merged 2 commits into from Dec 29, 2014
Merged

Chainable methods #722

merged 2 commits into from Dec 29, 2014

Conversation

tomalec
Copy link
Contributor

@tomalec tomalec commented Dec 3, 2013

Hi again,

It's duplicate of pretty old #244, but hopefully this time PR is more suitable for contribution ;-)

So again:

I get an idea (, and need ;) ) to chain datepicker methods. E.g.

var myDatepicker = $('.selector').data('datepicker')
                                    .setDate(defaultDate)
                                    .show()

@tomalec tomalec mentioned this pull request Dec 3, 2013
tomalec referenced this pull request in tomalec/bootstrap-datepicker Dec 9, 2013
@benjaoming
Copy link

👍 for the ability to form chains!!

@acrobat acrobat modified the milestones: 1.3.2, 1.4.0 Dec 15, 2014
@acrobat
Copy link
Member

acrobat commented Dec 18, 2014

@tomalec can you rebase the pr against the current master

@tomalec
Copy link
Contributor Author

tomalec commented Dec 22, 2014

@acrobat PR rebased, but as I haven't used bootstrap-datepicker for more than a year now, it's hard for me to check anything else than test suite.

@acrobat acrobat merged commit 4324ab8 into uxsolutions:master Dec 29, 2014
@acrobat
Copy link
Member

acrobat commented Dec 29, 2014

Thanks @tomalec!

@acrobat acrobat mentioned this pull request Dec 29, 2014
6 tasks
@ragulka
Copy link
Contributor

ragulka commented Mar 24, 2015

This seems to break the default jQuery chainability, for example:

$('#myfield').datepicker('setDate', new Date()).show();
// does not work: Uncaught TypeError: undefined is not a function

Or am I missing something?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants