invalid date in editor

invalid date in editor

LapointeLapointe Posts: 430Questions: 81Answers: 4

Hello
How to show nothing in editor when a date is null...
Invalid Date is in moment.js but not translated at all (in moment-with-locales.js)
for table, with render should be ok, but in editor ?

This question has an accepted answers - jump to answer

Answers

  • colincolin Posts: 15,152Questions: 1Answers: 2,587

    Hi @Lapointe ,

    Do you mean in the main table, or the Editor forms? If main table, something like this should do the trick.

    Cheers,

    Colin

  • LapointeLapointe Posts: 430Questions: 81Answers: 4

    hi @colin

    for table...ok, but in editor ?
    

    As asked, for editor please...

    I had a look in moment-with-locales.js and nowhere "invalid date" was translated...

    Cheers
    Roberto

  • allanallan Posts: 61,744Questions: 1Answers: 10,111 Site admin
    Answer ✓

    Its coming from Moment.JS.

    However, there is an underlying issue with null values and the Editor datetime component - they basically don't work. That is something we need to address and I plan to for the 1.9.3 release.

    Allan

  • allanallan Posts: 61,744Questions: 1Answers: 10,111 Site admin

    Fix committed for 1.9.3 which will drop soon.

    Allan

  • VolkhardVVolkhardV Posts: 20Questions: 5Answers: 0
    edited June 2020

    Hello Allan,
    i´m using datetime with the following options:

                        wireFormat: 'YYYY-MM-DDTHH:mm:ss',
                        displayFormat: '[KW]ww (DD.MM.YYYY)',
                        opts: {
                            momentLocale: 'de',
                            showWeekNumber: true
                        }
    

    with this "invalid date" is still shown - i´m using 1.9.3

    do you have an idea?

    best regards

    Volkhard

    Edited by Colin - Syntax highlighting. Details on how to highlight code using markdown can be found in this guide.

  • colincolin Posts: 15,152Questions: 1Answers: 2,587

    Are you able to link to your page so we can take a look? If not, can you post the JSON for one of your records where you're seeing this error.

    Colin

This discussion has been closed.