Post

Replies

Boosts

Views

Activity

Reply to Why doesn't SwiftUI TextField currency format seem to work for Euros (EUR)?
I have the exact same problem with GBP too. I haven't tried too many currencies, but it works perfectly if I just change GBP to USD below. TextField("Total Here", value: $totalValue,  format: .currency(code: "GBP")) .keyboardType(.decimalPad) When set to USD, I can enter values in the TextField with commas and the currency symbol, and my input updates as I type (as long as the input is valid - if it isn't, no action occurs). This is the precise behaviour I want. The minute I change the currency format to GBP (or EUR), I have to enter a "pure" number only, e.g., 179019.18. No input like "£170,019.18" works. I'm new to Swift UI, but is there a way around this?
Dec ’22