Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/noxt/ScrollableDatepicker
Yet another datepicker for iOS
https://github.com/noxt/ScrollableDatepicker
datepicker podfile swift
Last synced: 3 months ago
JSON representation
Yet another datepicker for iOS
- Host: GitHub
- URL: https://github.com/noxt/ScrollableDatepicker
- Owner: noxt
- License: mit
- Created: 2016-10-01T19:12:53.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2022-07-26T17:55:27.000Z (over 2 years ago)
- Last Synced: 2024-07-20T04:12:56.241Z (4 months ago)
- Topics: datepicker, podfile, swift
- Language: Swift
- Homepage:
- Size: 89.8 KB
- Stars: 349
- Watchers: 9
- Forks: 38
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
ScrollableDatepicker
============![demo](Screenshots/screen.png)
## Getting Started
An [example ViewController](https://github.com/noxt/ScrollableDatepicker/blob/master/ScrollableDatepicker/PresentationLayer/ViewController.swift) is included demonstrating ScrollableDatepicker's functionality.
## Installation
### CocoaPods
Add the following line to your Podfile:
```ruby
pod 'ScrollableDatepicker', '~> 2.2'
```Then run the following in the same directory as your Podfile:
```ruby
pod install
```### Manual
Clone the repo and drag files from `Sources` folder into your Xcode project.
## Configuration
### Day Style Configuration
You can customize following properties for each state (default, weekend, selected):
- Font & Color for day, week day and month
- Background Color for cell
- Selector ColorDepending on the state of the cell, its style is composed of the default and appropriate styles.
### Data Configuration
- Number of dates in one screen
### Example
![demo](Screenshots/screen-customization.png)
```swift
var configuration = Configuration()// weekend customization
configuration.weekendDayStyle.dateTextColor = UIColor(red: 242.0/255.0, green: 93.0/255.0, blue: 28.0/255.0, alpha: 1.0)
configuration.weekendDayStyle.dateTextFont = UIFont.boldSystemFont(ofSize: 20)
configuration.weekendDayStyle.weekDayTextColor = UIColor(red: 242.0/255.0, green: 93.0/255.0, blue: 28.0/255.0, alpha: 1.0)// selected date customization
configuration.selectedDayStyle.backgroundColor = UIColor(white: 0.9, alpha: 1)
configuration.daySizeCalculation = .numberOfVisibleItems(5)datepicker.configuration = configuration
```
## Requirements
- iOS 9.0
- Xcode 8.0## License
ScrollableDatepicker is available under the MIT license. See LICENSE for details.