JSFiddle - React, Tailwind, and code Playground
HTML
[html]
<div class="form-group row">
<input name="about_date" id="about_date" type="date" class="form-control" value=""/>
</div>
<div class="form-group row">
<div class="main_contents_setting">
<input type="checkbox" name="month_main" id="month_main">
<input type="checkbox" name="year_main" id="year_main">
</div>
</div>
JavaScript
$(function() {
$("#about_date").change(function() {
if( $(this).val() === "" ) {
$('#month_main').prop('disabled', true);
$('#year_main').prop('disabled', true);
} else {
$('#month_main').prop('disabled', false);
$('#year_main').prop('disabled', false);
}
}).change();
});