Skip to content

Commit bf70011

Browse files
author
Wojciech Lembryk
committed
Merge branch 'master' of https://github.com/retailcrm/Fastis
2 parents 6830cdf + 0a5815c commit bf70011

File tree

5 files changed

+7
-6
lines changed

5 files changed

+7
-6
lines changed

Cartfile.resolved

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
github "SnapKit/SnapKit" "5.0.1"
2-
github "ilia3546/PrettyCards" "1.0.3"
2+
github "ilia3546/PrettyCards" "1.0.4"
33
github "patchthecode/JTAppleCalendar" "8.0.3"

Fastis.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Pod::Spec.new do |s|
22
s.name = 'Fastis'
3-
s.version = '1.0.7'
3+
s.version = '1.0.10'
44
s.summary = "Simple date picker created using JTAppleCalendar library"
55
s.description = <<-DESC
66
Fastis is a fully customizable UI component for picking dates and ranges created using JTAppleCalendar library.

Package.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ let package = Package(
3636
dependencies: [
3737
.package(url: "https://github.com/patchthecode/JTAppleCalendar", from: "8.0.3"),
3838
.package(url: "https://github.com/SnapKit/SnapKit", from: "5.0.1"),
39-
.package(url: "https://github.com/ilia3546/PrettyCards", from: "1.0.3")
39+
.package(url: "https://github.com/ilia3546/PrettyCards", from: "1.0.4")
4040
],
4141
targets: [
4242
.target(name: "Fastis",

Source/Views/CurrentValueView.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ class CurrentValueView<Value: FastisValue>: UIView {
4444

4545
private lazy var dateFormatter: DateFormatter = {
4646
let formatter = DateFormatter()
47-
formatter.locale = .autoupdatingCurrent
47+
formatter.locale = self.config.locale
4848
formatter.dateFormat = self.config.format
4949
return formatter
5050
}()
@@ -155,5 +155,6 @@ extension FastisConfig {
155155
public var clearButtonTintColor: UIColor = .darkGray
156156
public var insets: UIEdgeInsets = UIEdgeInsets(top: 8, left: 0, bottom: 24, right: 0)
157157
public var format: String = "d MMMM"
158+
public var locale: Locale = .autoupdatingCurrent
158159
}
159160
}

Source/Views/WeekView.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ class WeekView: UIView {
2626
// MARK: - Variables
2727

2828
private let config: FastisConfig.WeekView
29-
public var currentCalendar: Calendar = .current
3029

3130
// MARK: - Lifecycle
3231

@@ -50,7 +49,7 @@ class WeekView: UIView {
5049
}
5150

5251
private func configureSubviews() {
53-
var weekDays = self.currentCalendar.shortWeekdaySymbols
52+
var weekDays = self.config.calendar.shortWeekdaySymbols
5453
weekDays.append(weekDays.remove(at: 0))
5554
for weekdaySimbol in weekDays {
5655
self.stackView.addArrangedSubview(self.makeWeekLabel(for: weekdaySimbol))
@@ -81,6 +80,7 @@ class WeekView: UIView {
8180

8281
extension FastisConfig {
8382
public struct WeekView {
83+
public var calendar: Calendar = .current
8484
public var backgroundColor: UIColor = .groupTableViewBackground
8585
public var textColor: UIColor = .darkGray
8686
public var textFont: UIFont = .systemFont(ofSize: 10, weight: .bold)

0 commit comments

Comments
 (0)