Create a date field in the XML form
field name="nextdate" type="calendar" class="inputbox" filter="safehtml" label="COM_COMDATE_FORM_LBL_COMDATEDETAIL_NEXTDATE" description="COM_COMDATE_FORM_DESC_COMDATEDETAIL_NEXTDATE" hint="COM_COMDATE_FORM_LBL_COMDATEDETAIL_NEXTDATE"
and in the SQL create a table with the default value null as follows
CREATE TABLE IF NOT EXISTS `#__comdate_details` (
`id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT,
`state` TINYINT(1) NULL DEFAULT 1,
`ordering` INT(11) NULL DEFAULT 0,
`checked_out` INT(11) UNSIGNED,
`checked_out_time` DATETIME NULL DEFAULT NULL ,
`created_by` INT(11) NULL DEFAULT 0,
`modified_by` INT(11) NULL DEFAULT 0,
`name` VARCHAR(255) NULL DEFAULT "",
`nextdate` DATE NULL DEFAULT NULL,
PRIMARY KEY (`id`)
) DEFAULT COLLATE=utf8mb4_unicode_ci;
facing error incorrect date field when trying to save the field without selecting a date in the date field Refer to the image