fpdcc / ccfp-asset-dashboard

CCFP Asset Dashboard
0 stars 1 forks source link

Format money inputs in USD #262

Closed xmedr closed 1 year ago

xmedr commented 1 year ago

Overview

This formats the initial dollar amounts of pre-existing funding input fields to USD, with comma separators. This also applies the same formatting to those inputs as the user types.

Formatting while typing only applies when the amounts entered are numerical. And some extra validation was added now that those input fields allow for text instead of just numbers.

Closes #255

Demo

image

Testing Instructions

xmedr commented 1 year ago

ah i was wondering why my extra options in toLocaleString weren't working before. it's because i was missing that "en-US" param at the very beginning that you mentioned. thanks for that!