Skip to content

Commit

Permalink
How to change minimum and maximum Calendar
Browse files Browse the repository at this point in the history
the following issues' help

WenchaoD#870
WenchaoD#250
  • Loading branch information
ykws committed Mar 22, 2019
1 parent 3fdc2a4 commit 17a227f
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -297,6 +297,27 @@ BOOL inSameUnit = [self.gregorian isDate:date1 equalToDate:date2 toUnitGranulari

```
## How to change minimum and maximum Calendar
* Set today to minimum
```swift
class MyViewController: FSCalendarDatasource {
func minimumDate(for calendar: FSCalendar) -> Date {
return Date()
}
}
```

* Set todya to maximum

```swift
class MyViewController: FSCalendarDatasource {
func maximumDate(for calendar: FSCalendar) -> Date {
return Date()
}
}
```

## <a id="support"></a>Support this repo
* [**★Star**](#) this repo
Expand Down

0 comments on commit 17a227f

Please sign in to comment.