Fixed calendar to show or not endDate if it is earlier than the start one