diff --git a/mod/forum/templates/big_search_form.mustache b/mod/forum/templates/big_search_form.mustache index 8a8a7f64f1e..6fc760cff45 100644 --- a/mod/forum/templates/big_search_form.mustache +++ b/mod/forum/templates/big_search_form.mustache @@ -161,12 +161,12 @@ $('#searchform input[name^=h' + prefix + ']').val(disabled ? 1 : 0); }; - toggleDateFields('from', true); + toggleDateFields('from', !$("#searchform input[name='timefromrestrict']").prop('checked')); $("#searchform input[name='timefromrestrict']").click(function() { toggleDateFields('from', !this.checked); }); - toggleDateFields('to', true); + toggleDateFields('to', !$("#searchform input[name='timetorestrict']").prop('checked')); $("#searchform input[name='timetorestrict']").click(function() { toggleDateFields('to', !this.checked); }); diff --git a/theme/boost/templates/mod_forum/big_search_form.mustache b/theme/boost/templates/mod_forum/big_search_form.mustache index 32d30d40031..c376145a928 100644 --- a/theme/boost/templates/mod_forum/big_search_form.mustache +++ b/theme/boost/templates/mod_forum/big_search_form.mustache @@ -160,12 +160,12 @@ require(['jquery'], function($) { $('#searchform input[name^=h' + prefix + ']').val(disabled ? 1 : 0); }; - toggleDateFields('from', true); + toggleDateFields('from', !$("#searchform input[name='timefromrestrict']").prop('checked')); $("#searchform input[name='timefromrestrict']").click(function() { toggleDateFields('from', !this.checked); }); - toggleDateFields('to', true); + toggleDateFields('to', !$("#searchform input[name='timetorestrict']").prop('checked')); $("#searchform input[name='timetorestrict']").click(function() { toggleDateFields('to', !this.checked); });