Android Question Designer, EditText

ciginfo

Well-Known Member
Licensed User
Longtime User
Hi,
With designer B4A, I want enter dates (DD/MM/ YYYY) into an EditText. What is the ideal "Input Type", TEXT, NONE, NUMBERS, DECIMAL NUMBERS, PHONE?
Thank you.
 

Mahares

Expert
Licensed User
Longtime User
What is the ideal "Input Type", TEXT, NONE, NUMBERS, DECIMAL NUMBERS, PHONE?
Bonjour Monsieur ciginfo:
The ideal way is to use the B4XDateTemplate from the XUI Views lib, but if you simply want to use the keyboard, you can set a SetCustomFilter with the IME lib. like shown below. This will only allow the characters shown, but will not prevent you from typing a bad date, like: 32/14/2020
B4X:
Private IME As IME
    IME.Initialize("")
    IME.SetCustomFilter(EditText1, EditText1.INPUT_TYPE_NUMBERS, "0123456789/")
 
Upvote 0

ciginfo

Well-Known Member
Licensed User
Longtime User
Thank you
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…