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

Callback on "Prev" and "Next" click #59

Closed
isteven opened this issue Sep 28, 2016 · 4 comments
Closed

Callback on "Prev" and "Next" click #59

isteven opened this issue Sep 28, 2016 · 4 comments

Comments

@isteven
Copy link

isteven commented Sep 28, 2016

Hi @twinssbc ,

Thanks for the directive, it's really helpful.

I need to create a callback when the next / prev button is clicked. Something similar with this: #40.

As suggested there, I tried using the "range-changed" attribute, but I'm still unable to get my callback function triggered.

My HTML:

<calendar
    calendar-mode="month"    
    range-changed="rangeChanged(startTime, endTime)"
 ></calendar>

My Javascript:

$scope.rangeChanged = function (startTime, endTime) {
    console.log(startTime, endTime); // should print something, but empty
}

Any help would be appreciated. Thanks.

@isteven
Copy link
Author

isteven commented Sep 28, 2016

Sorry, please ignore this question, I managed to do it. Will open a new issue.

@isteven isteven closed this as completed Sep 28, 2016
@iamntg
Copy link

iamntg commented Nov 14, 2016

@isteven Hi, I am facing the same problem. how did you managed to get this done?

@twinssbc
Copy link
Owner

@iamntg What's your issue? The rangeChanged callback is not triggered?
This callback is only triggered when the queryMode is set to 'remote', did you set it?

@iamntg
Copy link

iamntg commented Nov 15, 2016

@twinssbc Hey, it was fixed, Thank you. The queryMode need to be set as variable from the controller. I was trying to set it directly from the html.

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

No branches or pull requests

3 participants