[Custom Masks] How to add a non mandatory date?

[Custom Masks] How to add a non mandatory date?

Forge Component
Published on 7 Mar by Jogait
22 votes
Published on 7 Mar by Jogait
In a form when I have a non mandatory date that isn't filled, the error "Date expected!" is returned for that field! Using [ ], the error isn't displayed but the form doesn't submit.

The only way I found to submit the form without any errors is to check if that field as a null date, and if it has, then set the form widget to valid and clear the error message.

Is there any other way?

Couldn't you set the input field's type to Text?

Hello Lucendria,

I just uploaded a new version where this behavior is fixed.

Let me know if you have other issues using the component.

Thank you!


This is still/again an issue.

When debugging, the widget holds the mask in the "typedvalue", even when we didn't even go near the widget. Off course, it's easily fixed by checking the value on submit, but that's far from a clean solution.