<pre> <script type="text/javascript">
$(document).ready(function () {
$(document).on("click", "#Lockuntil", onClickCheckBox)
$('#TextValue').datepicker({
orientation: "bottom auto",
format: 'dd MM yyyy',
todayHighlight: true,
minDate: 0
}).on('changeDate', function (ev) {
$(this).datepicker('hide');
});
onClickCheckBox();
});
function onClickCheckBox()
{
if ($('#Lockuntil').is(":checked")) {
$("#TextValue").show();
}
else {
$("#TextValue").hide();
}
}
</script>