Xojo Textfield and Mask Bug?

I get the same as when I use ##:## and type 1215, I get 12:15, in all 3 computers.

I type in 5555 and got 55:55 just what I would have expected

@Dave S That worked! Wow… Thank you very much. I guess that the “:” needs a \ in front of it. I learned something new today! :slight_smile:

Thank you all… Much appreciated! :slight_smile:

So Byron, Brian, Emile and Dave get the ‘10/21/01, 9’ on their Macs and I get the correct value on 3 different Macs with Sierra, High Sierra and Mojave. Unbelievable.

I can’t think of a thing that could be causing this.

yeah… that is strange… and the inconsistancy will make it even hard to track down

That’s one reason why I was thinking it might be “user” error – AKA, me. Hehe.

FYI… The above testing I did was under Mojave on my iMac
I just tried it on my Laptop with Yosemite and Xojo2019r1.1 and got the same (wrong) results

So for me 2 out of two computers were “wrong”

User setting in system preferences on how you handle input, date and time formats etc come to mind.

But Dave’s solution seems to be working universally so escaping the : with \ is the correct way to go.

Does this from the docs work on Mac? [quote]TextField1.Mask = “(###) ###-####” // US Phone number, with area code[/quote]

On Windows I can use @Dave S’s tip & escape the literals, but still need to add

[code]Sub GotFocus() Handles GotFocus
If me.Text = “” Then
me.Text = “(”
me.SelStart = 2
me.SelStart = 1
End If

End Sub[/code]
to the textfield, otherwise to get past the first “(” the user has to enter that 1st character. The rest work ok.

yup…you have to type that 1st “(”

Note : these issues are why I NEVER use MASK at all

After viewing the first video again I found an easy way to test that mask works or not, just enter 00:00 into Mask then enter. No need to run to test.
The IDE will show 00:00 if it works and will show 0010/21/01, 9:00 if it has this problem.

[quote=446610:@Wayne Golding]Does this from the docs work on Mac?
…otherwise to get past the first “(” the user has to enter that 1st character. The rest work ok.[/quote]
No, it doesn’t work.

This video is far better and display what I saw here (excepted for the date: 2001 ?).

Now, this does not works as asked since as Dave shows, you are able to enter 5555; there is no time lie that :frowning: