Mask Data and Click to Show

What is the easiest way to mask data in an input text or date field - ie DOB: 10/10/XXXX - click the field to show the info. Thanks.

I think a pointer in the right direction is to use this approach here: Set "inputmode" on a currency field to "decimal"? - then add some JavaScript so when that element is pressed it will remove that input mask.