column.render does not affect editor value

column.render does not affect editor value

yu yen kanyu yen kan Posts: 65Questions: 31Answers: 0

as title, I have a value 10000 using render to display as 10,000.00, in editor it show 10000.
Did I need to use render again for editor? or how?

Answers

  • allanallan Posts: 63,866Questions: 1Answers: 10,520 Site admin

    Editor operates on the raw data. It does not provide a rendering option for the field value.

    To my mind you probably don't want to have the field formatted in the Editor anyway. Let's take your example of "10,000". What if the user wanted to change it to one thousand and entered "10,00". Is that a valid input? To side step that issue, and others, Editor works on the raw data.

    Allan

  • Dave BaeschDave Baesch Posts: 3Questions: 2Answers: 0

    But is there a way to have the editor format the initially displayed value with a decimal place. For example, the raw data is 0. The cell render displays the value as 0.0. When user clicks to edit, editor displays 0, but can it display 0.0?

  • yu yen kanyu yen kan Posts: 65Questions: 31Answers: 0

    well, if it is for number, ok I understand why it is this way. What if it is Date? date having a format option in editor field, but the data is not process it when edit

  • allanallan Posts: 63,866Questions: 1Answers: 10,520 Site admin

    @Dave Baesch - One option for formatted numbers in the input elements would be to use the Mask plug-in for Editor.

    @yu yen kan For dates, Editor has the datetime field type which can handle complex date formats through its Moment.js integration.

    Allan

  • yu yen kanyu yen kan Posts: 65Questions: 31Answers: 0

    @allan yes, my field with type: datetime" and format: 'YYYY MMMM DD HH:mm', but when date pass in, it does not parse, just when pick a time only it parse to this format

  • allanallan Posts: 63,866Questions: 1Answers: 10,520 Site admin

    Could you give me a link to the page so I can debug it please?

    Thanks,
    Allan

  • yu yen kanyu yen kan Posts: 65Questions: 31Answers: 0

    I do it on local, don know how to give it to you

This discussion has been closed.