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

How can I add more months when the user reaches the end of the top or bottom of the scroll bar? #55

Closed
paulbors opened this issue Jan 28, 2013 · 8 comments

Comments

@paulbors
Copy link

The calendar comes with a default weeksBefore and weeksAfter both set to 26.

How would I be able to add an extra month to the calendar each time the user reaches the top or bottom while scrolling through?

~ Thank you in advance,
Paul Bors

@paulbors
Copy link
Author

What I would like to do is something similar to this function:

$('.calendarScrollContent').scroll(function() {
....if($(this).scrollTop() == 0) {
......// Add a month (or more) to the start range of the calendar
....}
})

@eeroan
Copy link
Contributor

eeroan commented Jan 29, 2013

There was once an issue for such behavior, but it was never implemented since there was no real case for it. Usually plain text field suits better for selecting dates from far future or past when you know the exact date. This component works with cases like "last Monday" or "first Tuesday of next month".

What's your case?

I'm willing to accept a pull request :)

@paulbors
Copy link
Author

We've been around for the past 10 years collecting user data for large customers data bases.

In order to filter for a date range we choose the jquery-continuous-calendar in the UI, however we noticed it is quite slow in ie9 when adding 10 years to the scroll pane.

Instead it would be nice if the calendar starts with its default settings and if the user wants to report on an "out of range" date the calendar would add a month each time the scroll bar reaches its ends.

I glimpsed over the JavaScript and didn’t quite understand the simple way of adding more to the scroll table. I don’t mind generating a pull request but some hints on how this could be achieved would be nice :)

@eeroan
Copy link
Contributor

eeroan commented Jan 31, 2013

I'm btw planning to extract the dom rendering code as separate module. while doing that I'll keep this feature request in mind.

Imho scrolling 10 years to find a known date doesn't sound very convenient.

@paulbors
Copy link
Author

It doesn’t :)

The Continuous-Calendar is shown after the two date text fields as a pop-up in case the user would like to select a small recent time frame. To satisfy the larger ranges, I hid the labels and showed the text fields where the user can input such large date ranges.

Thus my UI appears similar to:
From [01/01/1234] To [01/14/1234] [pop-up icon]

The labels are hidden and the CSS for the input fields shows them in-line.

But... to select from past few year, (to compare the last 2 weeks of January this year with the previous year) adding that many months to the calendar will slow it down.

@eeroan
Copy link
Contributor

eeroan commented Feb 21, 2013

I'm having progress with the refactoring in split_to_modules branch. After it is finished calendar rendering and range behavior are extracted as separate modules. I believe resolving this issue is easier then.

But before starting this task #3 (Autoscroll while dragging) should be implemented first.

@paulbors
Copy link
Author

paulbors commented May 6, 2013

The project's home page has "No pagination, continuous month flow" listed as a feature.
Does that mean this is now supported? And if so, how can I use the continuous month flow as I see the API doesn't mention anything about it.

@eeroan
Copy link
Contributor

eeroan commented May 7, 2013

It only means that you don't neet to click previous/next month but being able to scroll instead. I have made some refactoring in order to implement this feature more easily. Feel free to contribute.

@eeroan eeroan closed this as completed May 7, 2013
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

2 participants