-
Notifications
You must be signed in to change notification settings - Fork 579
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
Add an option to configure how the number of days is calculated #253
Comments
Mm, interesting, but might become potentially complex? Can you give a use case on "when" this would be usefull? @longbill, what is your stance on this? |
@holtkamp For example in the "Typical usage, hotel booking" example on http://longbill.github.io/jquery-date-range-picker/, you typically select the check in and check out dates, so if I check in on the 3rd and check out the 4th I would expect it to say
As for the |
@multiwebinc, mm, yeah, the "hotel booking" seems useful indeed. In case you got time and energy to work on a PR and some examples would be great! |
I think it is better to impliment in hoveringTooltip function, than make plugin more complex. |
@holtkamp Actually yeah. After seeing how easy it was to edit the tooltip I actually agree with @shrpne. It's probably best not to make the plugin too bloated for a feature that (probably) won't be used that much. However I could work on a PR if you wish when I get time since I can't see it being that hard, or maybe just close this ticket. |
@multiwebinc Thank you for your example! Did you also find how to change the |
@barryvdh Could be as easy as setting a custom language, like https://github.com/longbill/jquery-date-range-picker/blob/31d1eafe296816b7639fd2e91e8ca23c8775e187/demo.js. |
Suppose we have the range
15.06.2016 23:59 ~ 16.06.2016 00:00
. The length of time between the start and the end is only 1 second, however this library displays "2 days" because it spans across 2 separate calendar dates. I suggest adding a way to configure this.Configuration option: daysMode('span' / 'nights' / 'period')
I haven't looked at the code, but I can't see this being overly difficult to achieve. If you are interested let me know and I'll code it and submit a pull request.
The text was updated successfully, but these errors were encountered: