checkbox - checked will change textbox value
<p>what i want is that changing textbox value with checkbox. when checkbox is checked, textbox must be '2020-01-01'</p>

<p>I did this</p>

<pre><code>$('#checkPub').click(function() {
   $("#demo1").val('2020-01-01');
});
</code></pre>

<p>It gives only me the checkbox as output why? It does not change the textbox value</p>
