Null values in datetime fields

Null values in datetime fields

it@isas.deit@isas.de Posts: 1Questions: 1Answers: 0

Dear Sir or Madam,

In December 2015 there was a discussion about NULL values in datetime fields in the editor. A bug fix was promised for version 1.5.4. Now I'm working with DataTables Editor version 1.6.4 and still have this problem. When I open a record with NULL in a date field then I see an empty field in the editor form. But when I save the record the date field has the value 1900-01-01. Is there a bug fix or at least a work around for this error?

Best wishes
Peter Lampen

Answers

  • allanallan Posts: 63,498Questions: 1Answers: 10,471 Site admin

    Hi Peter,

    When the submit to the server is performed, you should be able to see in the browser's network inspector that it is sending an empty string to the server - is that the case? If so, then my guess is that the server is writing that string to the database and the database is "correcting" it to be a date. You could use a set formatter to tell it to write null to the database instead.

    Are you using the PHP or C# libraries for Editor? Or your own server-side code?

    Allan

This discussion has been closed.