Argeares,
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>jQuery UI Slider - Slider bound to select</title>
<link rel="stylesheet" href="https://code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css">
<link rel="stylesheet" href="https://resources/demos/style.css">
<script src="https://code.jquery.com/jquery-1.12.4.js"></script>
<script src="https://code.jquery.com/ui/1.12.1/jquery-ui.js"></script>
</head>
<body>
<form id="reservation">
<input type="number" step="1" min="1" max="27" id="minbeds" name="minbeds" size="4" value="1">
</form>
<script>
$( function() {
var select = $( "#minbeds" );
var slider = $( "<div id='slider'></div>" ).insertAfter( select ).slider({
min: 1,
max: 27,
range: "min",
value: select[ 0 ].value ,
slide: function( event, ui ) {
select[ 0 ].value = ui.value;
}
});
$( "#minbeds" ).on( "change", function() {
slider.slider( "value", this.value );
});
} );
</script>
</body>
</html>