JSFiddle - React, Tailwind, and code Playground
HTML
<div class="datetime">datetime</div>
<div class="placeholder">placeholder</div>
<div class="test">test: should be the same width as above</div>
CSS
.datetime, .placeholder, .test {
background: #EEE;
margin-bottom: 5px;
padding: 10px;
}
.test {
width: calc(100% - 90px);
}
JavaScript
var paxWidth = 90; //$('.pax').width() + 10;
$('.datetime, .placeholder').css('width', '100%').css('width', '-=90px');