Can I Set The Input Format Of Textfield

As the title. I want to set the input format of a textfiled to be XX-XX-XX. How can I do that? I have been searched on the internet and also the Yii website and since no answer for that. Thank you.

Is this a Yii specific question? Can you do what you are trying to do with regular html / php?

And do you mean like as you type, after every second character would be a hyphen, then it keeps typing

If so check out this jsfiddle

Google for "masked input"