New-UDTextBox -Mask for MAC Address?

Product: PowerShell Universal
Version: 1.5.13
Dashboard: 3.3.2

We’re trying to make a single text box input using New-UDTextbox -Mask parameter.
cmdlet:

New-UDTextbox -Id ‘MACAddress’ -Placeholder “00:00:00:00:00:00” -Mask @(’/[0-9a-fA-F]/’, ‘/[0-9a-fA-F]/’, “:”, ‘/[0-9a-fA-F]/’, ‘/[0-9a-fA-F]/’, “:”, ‘/[0-9a-fA-F]/’, ‘/[0-9a-fA-F]/’, “:”, ‘/[0-9a-fA-F]/’, ‘/[0-9a-fA-F]/’, “:”, ‘/[0-9a-fA-F]/’, ‘/[0-9a-fA-F]/’, “:”, ‘/[0-9a-fA-F]/’, ‘/[0-9a-fA-F]/’)

image

Pasting a MAC address into the textbox works perfect, removes invalid characters like hyphens and puts everything in the right spot.
Typing the characters in on the other hand doesn’t work so well. You type a single character and then it loses focus, you have to click in the box again and type another character, one character at a time.

I copied the example found at Textbox - PowerShell Universal and get the same issue with that.

I recently experienced the same issue and discussed it here. We were never able to come to a resolution, perhaps a feature request needs to be put in.

I opened an issue for this on our end.

EDIT: Oh, man…that’s not annoying at all… :grimacing:

2 Likes

Much appreciated Adam.