I have a 2 dates from 2 datepickers date1 = '2013-01-22' date2 = '2013-01-28' and I have a model like this
class SampleModel(models.Model):
item = models.CharField()
from_date = models.DateField()
to_date = models.DateField()
What I am tasked to do is to know if some of the dates between date1 and date2 is between those from_date and to_date (same item)
so for example if i have a from_date of '2013-01-24' and to_date '2013-01-27', some of the dates from input date1 and date2 (which are the days 24 25 26 27) are included and prompts true.
It's like an intersection. Any queries?
a gte on from_date and lte on to_date doesn't work since date1 is less than from date and date2 is greater than to date