I want to disable datepicker when clicking on radio button
<input
type="radio"
class="shwbtnrd"
required="required"
id="bookType"
name="bookType"
value="1"
checked="checked"
onclick="window.location='<?php echo $_SERVER['REQUEST_URI']; ?>';"
/>
<input
name="dat"
id="dat"
required="required"
readonly="readonly"
placeholder="Date of Birth"
class="form-control"
type="text"
/>
<script>
$(function () {
$("#dat").datepicker({
changeMonth: true,
changeYear: true,
yearRange: '-100:+0',
dateFormat: 'yy-mm-dd',
maxDate: new Date()
});
});
</script>
If i click on radio button then need to disable bootstrap datepicker