Skip to content

Commit

Permalink
Fixed bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
PinkQween committed Dec 26, 2023
1 parent 629f105 commit a5825e5
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions SoulSync/Views/FirstLuanch.swift
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,6 @@ struct InfoView: View {
var dateRange: ClosedRange<Date> {
let calendar = Calendar.current
let currentDate = Date()
let minDateComponents = calendar.dateComponents([.year, .month, .day], from: currentDate)

// Calculate the minimum date for a person to be 13 years old
let minDate = calendar.date(byAdding: .year, value: -113, to: currentDate) ?? currentDate
Expand Down Expand Up @@ -234,12 +233,12 @@ struct InfoView: View {
.keyboardType(.phonePad)
.textContentType(.telephoneNumber)
}
.onChange(of: phoneNumber) { newValue in
print("full unformatted: " + countryCodes[selectedCountryCodeIndex] + String(newValue))
fullPhoneNumber = formatPhone(phoneNumber: countryCodes[selectedCountryCodeIndex] + String(newValue))
validatePhoneNumber()
}
.onChange(of: selectedCountryCodeIndex) { newValue in
.onChange(of: phoneNumber, { oldValue, newValue in
print("full unformatted: " + countryCodes[selectedCountryCodeIndex] + String(newValue))
fullPhoneNumber = formatPhone(phoneNumber: countryCodes[selectedCountryCodeIndex] + String(newValue))
validatePhoneNumber()
})
.onChange(of: selectedCountryCodeIndex) { oldValue, newValue in
validatePhoneNumber()
}
.border(Color(UIColor.quaternaryLabel))
Expand Down

0 comments on commit a5825e5

Please sign in to comment.