Skip to content

Commit c9d4e65

Browse files
author
Christian Elies
committed
docs(readme): improvements, added example image
1 parent a31b4b4 commit c9d4e65

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

README.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,6 @@ The `API` mimics the one of the native `SwiftUI` `DatePicker` available for `iOS
1414

1515
## ℹ️ Installation
1616

17-
**First release published soon ...**
18-
1917
Just add this Swift package as a dependency to your `Package.swift`:
2018

2119
```swift
@@ -38,6 +36,10 @@ TVDatePicker(
3836
) // Available when Label conforms to View.
3937
```
4038

39+
At first the view appears as a button with a horizontal stack containing the specified `label`, a `Text` view representing the current `selection` date string and a `disclosure indicator` `Image` view. If you press the button a sheet with the actual date picker view appears. The following screenshot is an example:
40+
41+
<img src="https://github.com/crelies/TVDatePicker/tree/dev/example.png" alt="Screenshot of a date picker view usage example" width="800" height="450"></img>
42+
4143
## 📖 Implementation
4244

4345
The `DatePicker` view is implemented by using multiple `Picker`s with the `SegmentedPickerStyle` inside a `List` / `VStack`.
@@ -48,5 +50,5 @@ Each `Picker` represents a date component like `year`, `month` or `date`. Due to
4850
- ⚠️ The `DatePicker` was only tested with the `Gregorian calendar`.
4951
- The `year` component displays only `10` years at a time (`selected year +/- 5 years` with respect to the year of the specified `minimum date`).
5052
- ⚠️ Currently only the `year` component respects the `minimum date`. On the contrary `all months of a year` and `all days of a month` are visible at all time.
51-
- Currently the `hourAndMinute` component only supports the `24-hour` mode and not the `am/pm` mode.
53+
- Currently the `hourAndMinute` component always displays all `24 hours` of a day.
5254
- The `hourAndMinute` component supports only steps by five for the `minute`.

example.png

6.97 MB
Loading

0 commit comments

Comments
 (0)