Open Voyz opened 7 years ago
I'm running into this issue as well - I'm trying to show only one day.
My situation is it's two date selectors that are ideally 28 days apart. In certain situations that wont be possible (like if there are only 2 days between the start and now), so I want to lock them in to that one day for the start date so the chart shows as close to 28 days of data as possible.
I understand the purpose of rome.js / calendar selector is to select from within a range of days, and having only one day as an option makes the widget useless.
However, the problem I'm running into is that same Moment object can be used for rome.js and for time (hour/minute/etc.) selector. In such case the selection may sometimes be limited to one day, eg. between 8am and 11am. Rome.js will disallow such limits and forces me to duplicate one of the limit moments and move it by one day, in the end displaying an incorrect range to the user.
Lines 5085- 5087
My question is: Is there anything really stopping rome.js from displaying only one day?