I am trying to disable the full-day radio button when the shared radio button is selected and I want the color to be changed to disable radio button which can be seen below.
label[for=full-day] {
position: relative;
color: orangered;
font-size: 24px;
border: 2px solid orangered;
border-radius: 5px;
align-items: center;
display: flex;
cursor: pointer;
height: 36px;
width: 116px;
margin: 20px 20px 0px 0px;
justify-content: center;
}
input[type="radio"] {
display: none;
}
label[for=private] {
position: relative;
color: orangered;
font-size: 24px;
border: 2px solid orangered;
border-radius: 5px;
align-items: center;
display: flex;
cursor: pointer;
height: 36px;
width: 80px;
margin: 20px 20px 0px 0px;
justify-content: center;
}
label[for=shared] {
position: relative;
color: orangered;
font-size: 24px;
border: 2px solid orangered;
border-radius: 5px;
align-items: center;
display: flex;
cursor: pointer;
height: 36px;
width: 80px;
margin: 20px 20px 0px 35px;
justify-content: center;
}
label[for=half-day] {
position: relative;
color: orangered;
font-size: 24px;
border: 2px solid orangered;
border-radius: 5px;
align-items: center;
display: flex;
cursor: pointer;
height: 36px;
width: 150px;
margin: 20px 20px 0px 0px;
justify-content: center;
}
input[type="radio"]:checked+label {
background-color: orangered;
color: white;
}
input[type="radio"]:checked+label:before {
height: 16px;
width: 16px;
border: 10px solid white;
background-color: orangered;
}
label[for=full-day-disabled]{
color: #666666;
border: 2px solid #666666;
position: relative;
font-size: 24px;
border-radius: 5px;
align-items: center;
display: flex;
cursor: not-allowed;
height: 36px;
width: 80px;
margin: 20px 20px 0px 35px;
justify-content: center;
}
<div style="display: flex; width: 100%">
<input type="radio" name="occupancy" id="private" value="private" checked="checked">
<label for="private">Private</label>
<input type="radio" name="occupancy" id="shared" value="shared">
<label for="shared">Shared</label>
</div>
<div style="display: flex; width:100%">
<input type="radio" name="package" id="full-day" checked="checked">
<label for="full-day">Full Day</label>
<input type="radio" name="package" id="half-day">
<label for="half-day">Half Day</label>
</div>
<div style="display: flex; width:100%">
<input type="radio" name="package" id="full-day">
<label for="full-day-disabled">disabled</label>
</div>
I am trying to disable the full-day radio button when the shared radio button is selected and I want the color to be changed to disable radio button which can be seen below.