0

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 imageenter image description here

1 Answer 1

2

Here is the link which helped to fix my issue https://github.com/joomla/joomla-cms/issues/41519

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.