-
Notifications
You must be signed in to change notification settings - Fork 99
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* updated elegantpages to fix bug with willdisplaymonth being called multiple times at calendar creation * fixed bug where a month wouldn't show if the end date was exactly the start of that month * updated the examples * lowered the swift tools version * updated the examples
- Loading branch information
Showing
16 changed files
with
164 additions
and
282 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
// Kevin Li - 7:42 PM - 7/14/20 | ||
|
||
import ElegantCalendar | ||
import SwiftUI | ||
|
||
struct ChangeThemeButton: View { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
// Kevin Li - 12:05 PM - 8/1/20 | ||
|
||
import Foundation | ||
|
||
extension Date { | ||
|
||
static func daysFromToday(_ days: Int) -> Date { | ||
Date().addingTimeInterval(TimeInterval(60*60*24*days)) | ||
} | ||
|
||
} | ||
|
||
extension Date { | ||
|
||
var fullDate: String { | ||
DateFormatter.fullDate.string(from: self) | ||
} | ||
|
||
var timeOnlyWithPadding: String { | ||
DateFormatter.timeOnlyWithPadding.string(from: self) | ||
} | ||
|
||
} | ||
|
||
extension DateFormatter { | ||
|
||
static var fullDate: DateFormatter { | ||
let formatter = DateFormatter() | ||
formatter.dateFormat = "EEEE, MMM d, yyyy" | ||
return formatter | ||
} | ||
|
||
static let timeOnlyWithPadding: DateFormatter = { | ||
let formatter = DateFormatter() | ||
formatter.dateFormat = "h:mm a" | ||
return formatter | ||
}() | ||
|
||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
// Kevin Li - 12:08 PM - 8/1/20 | ||
|
||
import SwiftUI | ||
|
||
struct LightDarkThemePreview<Preview: View>: View { | ||
|
||
let preview: Preview | ||
|
||
var body: some View { | ||
Group { | ||
LightThemePreview { | ||
self.preview | ||
} | ||
|
||
DarkThemePreview { | ||
self.preview | ||
} | ||
} | ||
} | ||
|
||
init(@ViewBuilder preview: @escaping () -> Preview) { | ||
self.preview = preview() | ||
} | ||
|
||
} | ||
|
||
struct LightThemePreview<Preview: View>: View { | ||
|
||
let preview: Preview | ||
|
||
var body: some View { | ||
preview | ||
.previewLayout(.sizeThatFits) | ||
.colorScheme(.light) | ||
} | ||
|
||
init(@ViewBuilder preview: @escaping () -> Preview) { | ||
self.preview = preview() | ||
} | ||
|
||
} | ||
|
||
struct DarkThemePreview<Preview: View>: View { | ||
|
||
let preview: Preview | ||
|
||
var body: some View { | ||
preview | ||
.previewLayout(.sizeThatFits) | ||
.colorScheme(.dark) | ||
.background(Color.black.edgesIgnoringSafeArea(.all)) | ||
} | ||
|
||
init(@ViewBuilder preview: @escaping () -> Preview) { | ||
self.preview = preview() | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters