JSFiddle - React, Tailwind, and code Playground
HTML
<div class="row-fluid" id="set_alarm">
<label class="checkbox inline"><input type="checkbox" id="select_all"><b>Select All</b></label><br>
<label class="checkbox inline days"><input type="checkbox" class="days" id="Mon"><b>Mon</b></label>
<label class="checkbox inline days"><input type="checkbox" class="days" id="Tue"><b>Tue</b></label>
</div>
JavaScript
$('#select_all').change(function() {
$('.days').prop("checked", this.checked);
});
$('.days').change(function(){
if($('input:checkbox:checked.days').length === $("input:checkbox.days").length)
{
$('#select_all').prop("checked",true);
}
else
{
$('#select_all').prop("checked",false);
}
})