Skip to content

Commit

Permalink
Merge branch 'AG/SupportForPickingADateRange'
Browse files Browse the repository at this point in the history
* AG/SupportForPickingADateRange:
  Fix
  Added correct days off calculation
  Restore selection after shifting dates for range selection mode
  Fix for ruslanskorb#48, allow limiting dates in the calendar
  Allow selecting a date range
  Fix for ruslanskorb#48, allow limiting dates in the calendar

# Conflicts:
#	Example/Podfile.lock
#	Example/RSDayFlowExample/RSDFDatePickerViewController.m
#	RSDayFlow/RSDFDatePickerDayCell.h
#	RSDayFlow/RSDFDatePickerDayCell.m
#	RSDayFlow/RSDFDatePickerView.h
#	RSDayFlow/RSDFDatePickerView.m
  • Loading branch information
bartoszhernas committed Dec 2, 2016
2 parents 932e0b7 + 5ff15fd commit b08f4ce
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion RSDayFlow/RSDFDatePickerDaysOfWeekView.m
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,13 @@ - (void)updateWeekdayLabels
weekdayLabel.textAlignment = NSTextAlignmentCenter;
weekdayLabel.backgroundColor = dayOfWeekLabelBackgroundColor;
weekdayLabel.font = dayOfWeekLabelFont;
if ([symbolsToUse indexOfObjectIdenticalTo:weekdaySymbol] != 0 && [symbolsToUse indexOfObjectIdenticalTo:weekdaySymbol] != 6) {

CGFloat realWeekdayIndex = idx + [self.calendar firstWeekday] - 1;
if (realWeekdayIndex > 6) {
realWeekdayIndex -= 7;
}

if (realWeekdayIndex != 0 && realWeekdayIndex!=6) {
weekdayLabel.textColor = dayOfWeekLabelTextColor;
} else {
weekdayLabel.textColor = dayOffOfWeekLabelTextColor;
Expand Down

0 comments on commit b08f4ce

Please sign in to comment.