Baremetrics / calendar

Date range picker for Baremetrics
MIT License
679 stars 78 forks source link

Error on range when using double-calendar and same day is set for start and end date #60

Closed fafnirbcrow closed 7 years ago

fafnirbcrow commented 7 years ago

In my use case I am doing date range reporting, with month to date being the default option. When the system sets date for start and end date as the same day on the first day of the month, we get an invalid date range error when trying to select a new date. I would expect that even on a date range, you ought to be able to select start and end date to match sometimes, e.g. I only want to see one day of data, rather than build something to switch to single calendar if you want to do that.

kalepail commented 7 years ago

I'll try and take a look sometime next week. Though the code is quite user friendly so feel free to take a look yourself. Should be an easy solve. I assume you tried the 'same_day: true' key: vale?

kalepail commented 7 years ago

'same_day_range: true' sorry

kalepail commented 7 years ago

@fafnirbcrow Can you confirm that the same_day_range isn't working for you?

fafnirbcrow commented 7 years ago

@tyvdh I apologize, I somehow missed that that had gotten pulled in my project at some point in the past. Amazing how it works when you turn the setting on properly. Mi culpa. Thanks for the quick help!

kalepail commented 7 years ago

@fafnirbcrow No worries. Glad it's working for you!