Bug report #11244

Updated by Denis Rouzaud over 5 years ago

When a DateTime editor widget is populated with an invalid value, a NULL value is returned instead (even if NULL values are turned off in the edit widget).



E.g. The data has a date "2014-00-19" (which is kind of meaningless) and will not be able to interpret this. Just shortly opening this form in the dual view will result in the field being set to NULL.



I am not 100% sure how to deal with this situation, but I think that it would be more appropriate to just leave the field value untouched if the user does not touch it. Having the widget wrapper return an invalid QVariant instead of a NULL QVariant should fix it this way.

Back