Android Question forcing data entry as either date or time

Colin Evans

Active Member
Licensed User
Longtime User
hi is there a simple way of forcing entry in a particular format, I noticed in designer you can set the data entry to Text, Number , Decimal etc but I want to force the use to enter a date in the format DD/MM//YYY and time of HH:MM, I assume it can be done but can't find any examples
 

DonManfred

Expert
Licensed User
Longtime User
Upvote 0

Colin Evans

Active Member
Licensed User
Longtime User
that looks great but how would i apply to my edittext, i noticed when i went into designer there is a custom view named maskededittext1 but I'm completely lost how I'd use it on my edittext fields, presumably I wouldn't I use MaskedEditText but how
 
Upvote 0

Colin Evans

Active Member
Licensed User
Longtime User
Sorry, think I've solve my problem, I created a layout with the maskedittext1 fields and it seems to work
B4X:
    Activity.LoadLayout("default")
    ET1.Format = "Date/time: ##/##/#### ##:##"
    ET1.InputType = ET1.INPUT_TYPE_NUMBERS
    ET1.SingleLine = True
 
Upvote 0
Top