- Issue created by @tame4tex
- 🇧🇪Belgium BramDriesen Belgium 🇧🇪
I vaguely remember trying NULL in the original issue as that also seemed more appropriate for me. But for some reason that was not possible (don't remember exactly why, guess if I look a bit at the code I might remember).
Test coverage for this use case is pretty OK now, so we can try to change this to NULL.
Probably good to add a test for states as well.
- 🇨🇦Canada tame4tex
So I finally had some time to revisit this issue and add states testing.
I have added the states testing in a separate issue https://www.drupal.org/project/time_field/issues/3479769 📌 Add form conditional states testing Active to keep this issue as simple as possible.
It turns out my initial assumption was incorrect, states is actually working. It was our custom code that interacts with states that was failing due to expecting an empty string would mean empty.
Regardless, I am still going to work on the proposed resolution to see if NULL will work. In my opinion it is a much better approach than relying on 86401, if for no other reason than to get rid of the console warnings.
- 🇧🇪Belgium BramDriesen Belgium 🇧🇪
Some more background info can be found here: https://www.drupal.org/project/time_field/issues/3423941#comment-15464729 🐛 After 2.1.1 update all time fields are treated as required; empty values not accepted. Postponed: needs info