TCE form field with range cannot be cleared in some cases
After removing the TCA 'checkbox' option (the weird checkbox that cleared the field and could set the default value in it) and adding a clear icon inside the field to remove the contents, it is not possible to clear a (date) field which has a lower limit other than zero if the TCA definition of the field still has 'checkbox' => '0' (for backward compatibility).
The reason is a bit complex. The old 'checkbox' put the value of the checkbox property into the field. So, 'checkbox' => '0' would fill the field with '0' if the checkbox was unchecked.
The new clear icon just clears the input field and effectively fills it with an empty string value.
In t3lib_TCEmain::checkValue_input() there is a check:
'range' property is set
new value != 'checkbox' value
new value != 'default' value
then make sure value is inside range.
If both 'checkbox' => '0', 'default' => '0' are set you could -- in older versions -- clear the date field with the checkbox and this '0' value would prevent the range to take effect.
In the new situation the new value is '' if you clear the field. ('' != '0') gives TRUE for both the checkbox and the default property and thus activates the range check.
This effect can be seen in the tt_news records. Set the end-date field, save, clear the field, save, now the lower limit of the range property is inserted.
I don't see a quick solution with the loose comparison behaviour of PHP: http://www.php.net/manual/en/types.comparisons.php