Clear DBEdit with editmask lazarus / 16-Databases ---------------------------------------------------------------------- mangakissa · 2014-02-18 10:22 On a form I have several TDBEdits with a datetime field. On these fields I put an editmask on it Code: [Select]TDatefield(dataset.FieldByName('opzegdatum')).EditMask := '!90/00/0000';It works perfectly. But now I have a wrong input and want to delete the date (set blank or NULL). If I remove the date to the beginning of the TDBEdit and go to the next TDBEdit the old value returns. How can I remove a date with an editmask? ---------------------------------------------------------------------- mangakissa · 2014-02-19 08:09 No one is working with a mask on TDBEdit? ---------------------------------------------------------------------- exdatis · 2014-02-19 08:34 I use fields->properties in ObjectInspector, DisplayFormat, It's easy and useful ---------------------------------------------------------------------- mangakissa · 2014-03-16 15:19 The reason why I use editmask is giving the right format on date. I created a small demo to show what's wrong. When a date is filled in, it can not be deleted/cleared. Maybe some can show me what I'm doing wrong. ---------------------------------------------------------------------- howardpc · 2014-03-16 16:30 Quote from: mangakissa on February 18, 2014, 11:22:50 amIf I remove the date to the beginning of the TDBEdit and go to the next TDBEdit the old value returns. How can I remove a date with an editmask? If it is for an existing date in an already existing database, then I don't think a date editmask will acept it if you set the date to a null or empty value, since that cannot satisfy the mask. It will behave as if the underlying TField.Required was set to True (even if Required is False). You can't remove an existing date value altogether. You can only replace it with another valid value. That is the advantage (or disadvantage) of an editmask.