How can I format the value shown in a Rails edit field?

后端 未结 6 1961
别跟我提以往
别跟我提以往 2020-12-01 07:56

I would like to make editing form fields as user-friendly as possible. For example, for numeric values, I would like the field to be displayed with commas (like number

6条回答
  •  挽巷
    挽巷 (楼主)
    2020-12-01 08:20

    If you want a format to be created or maintained during editing, you will need to add Javascript to implement "masks." Here is a demo.

    It was the first hit in these results.

提交回复
热议问题