Remove Conditions From Model Using JS

Hi All,

I’ve got a Calendar (the option “Remember user’s last Date” is disabled) linked to a model. Based on user interactions the calendar can be shown or hidden (as often as the user wants). If you switch the date (either with the arrows or selecting another date with the datepicker) everything gets displayed just fine.
However if the Calendar is hidden and then shown again, the calendar doesn’t remove the old date conditions and adds new conditions to the model. Based on that (the conditions are linked with AND) the model returns 0 rows and doesn’t display anything in the calendar.
If I check the option “Remember user’s last Date”, the calendar works a few times and then removes all conditions and doesn’t add new ones for the selected date.

My question:
Is there a way to remove the old conditions or add new ones using JS? Or is there an other way to remove the conditions?

Any help is much appreciated


Not sure how you’re setting the conditions to begin with but what about some combination of the following using the action framework: deactivate model condition when they hide the calendar and then using set & activate model condition when the user wants to show the calendar again?