Sveta,
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>slider demo</title>
<link rel="stylesheet" href="https://code.jquery.com/ui/1.10.3/themes/mint-choc/jquery-ui.css">
<style>
#slider-diap { margin: 10px;width : 500px; }
</style>
<script src="https://code.jquery.com/jquery-1.9.1.js"></script>
<script src="https://code.jquery.com/ui/1.10.3/jquery-ui.js"></script>
</head>
<body>
<div id="slider-diap"></div>
<input id="startYear" value="2010"><input id="endYear" value="2010">
<script>
var storage = localStorage;
var a = JSON.parse(storage.getItem("values")) ||[2010, 2010];
$("#slider-diap").slider({
range: true,
min: 2000,
max: 2010,
values: a,
slide: function( event, ui ) {
storage.setItem("values", JSON.stringify(ui.values));
$( "#startYear" ).val( ui.values[ 0 ] );
$( "#endYear" ).val( ui.values[ 1 ] );
}
});
$( "#startYear" ).val( a[ 0 ] );
$( "#endYear" ).val( a[ 1 ] );
</script>
</body>
</html>