From 26e7e24ec7c6b4ea0a494e8f84c9059269d56353 Mon Sep 17 00:00:00 2001 From: Matt Bruce Date: Fri, 3 May 2024 09:30:23 -0500 Subject: [PATCH] added keypads Signed-off-by: Matt Bruce --- .../TextFields/InputField/InputField.swift | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/VDS/Components/TextFields/InputField/InputField.swift b/VDS/Components/TextFields/InputField/InputField.swift index 2b7fdab5..640538fe 100644 --- a/VDS/Components/TextFields/InputField/InputField.swift +++ b/VDS/Components/TextFields/InputField/InputField.swift @@ -405,3 +405,23 @@ open class InputField: EntryFieldBase { open var hidePasswordButtonText: String = "Hide" { didSet { setNeedsUpdate() } } open var showPasswordButtonText: String = "Show" { didSet { setNeedsUpdate() } } } + +extension InputField.FieldType { + + public var keyboardType: UIKeyboardType { + switch self { + case .number: + .numberPad + case .tel: + .phonePad + case .creditCard: + .numberPad + case .date: + .numberPad + case .securityCode: + .numberPad + default: + .default + } + } +}