React input formatting