Skip to content

Commit 6a0ca6d

Browse files
committed
Format dates temporarily
1 parent 573b3e1 commit 6a0ca6d

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

WooCommerce/Classes/ViewRelated/ReusableViews/SwiftUI Components/RangedDatePicker.swift

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
import Foundation
22
import SwiftUI
33

4-
/// View to reselect a custom date range.
4+
/// View to select a custom date range.
55
/// Consists of two date pickers laid out vertically.
66
///
77
struct RangedDatePicker: View {
88

99
@Environment(\.presentationMode) var presentation
1010

11-
/// Closure invoked when the the custom date range has been confirmed.
11+
/// Closure invoked when the custom date range has been confirmed.
1212
///
1313
var datesSelected: ((_ start: Date, _ end: Date) -> Void)?
1414

@@ -56,7 +56,9 @@ struct RangedDatePicker: View {
5656
VStack(spacing: Layout.titleSpacing) {
5757
Text(Localization.title)
5858
.headlineStyle()
59-
Text("Dec 1 - Dec 6") // TODO: This should be dynamic
59+
60+
// TODO: Properly format date ranges outside the view
61+
Text("\(DateFormatter.monthAndDayFormatter.string(from: startDate)) - \(DateFormatter.monthAndDayFormatter.string(from: endDate))")
6062
.captionStyle()
6163
}
6264
}

0 commit comments

Comments
 (0)