Skip to content

Commit 0124867

Browse files
authored
Update README.md
1 parent 8896d40 commit 0124867

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

README.md

+22
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,28 @@
2727
FXDatePickerView(selectedDate: $selectedDate, specialDates: specialDates)
2828
```
2929

30+
## Using `specialDates` to Add Custom Markers
31+
32+
The `specialDates` array allows you to add custom markers to specific dates in your calendar. You can use either custom images or SF Symbols to highlight these dates. Each special date is defined with its type (`SpecialDateType`), which can be an `ImageType` for images or an `SFSymbolsType` for SF Symbols. Format the dates in the "Day/Month/Year" format.
33+
34+
### Adding SF Symbols to Dates
35+
36+
To mark a date with an SF Symbol, create a `SpecialDate` instance with `dateType` set to `.sfSymbols`. Provide the date, the symbol's name, and its color:
37+
38+
```swift
39+
let specialDates: [SpecialDate] = [
40+
SpecialDate(dateType: .sfSymbols(SFSymbolsType(dateString: "2/1/2024",
41+
imageName: "airplane.departure",
42+
color: .blue)))
43+
]
44+
```
45+
46+
to add image use :
47+
48+
```swift
49+
SpecialDate(dateType: .image(ImageType(dateString: "13/1/2024", imageName: "home"))
50+
```
51+
3052
# Customize | Available modifiers:
3153

3254
### calenderType

0 commit comments

Comments
 (0)