XLForm icon indicating copy to clipboard operation
XLForm copied to clipboard

Autoformatting of typed text in text fields?

Open jonchu opened this issue 12 years ago • 1 comments

It'd be nice to be able to apply autoformatters to text fields.

For example, if I'm typing a phone number, i want 1234567890 to automatically become (123)456-7890.

Or in field with mm/yy have 0119 automatically become 01/19

jonchu avatar Jul 14 '14 21:07 jonchu

I created a pull request which adds support for NSFormatter to the text view cell. I also added some examples that show phone formatting, percentage formatting & currency formatting.

You should easily be able to subclass NSFormatter to support a 0119 <-> 01/19 formatter.

https://github.com/xmartlabs/XLForm/pull/77

bhirt-bpl avatar Aug 04 '14 04:08 bhirt-bpl