title: How can I create a slider that would display date, and is there a way to make markers appear in the website depending on the position of the slider?
body: <p>I have been struggling for the past day at creating a slider which would simply display a date, for some reason when I write <code>input type="date"</code> instead of <code>input type="range"</code> the slider always stops working. Can anyone please show me a sample code for a slider that displays a date?</p>
  
  <p>Also another thing I was wondering about whether it is possible to display or hide images/markers/text in the website depending on the position of the slider? For example if I add an image of a map in my website, can I make different markers appear and disappear on this map with the use of the slider? If this is indeed possible, please point me towards resources where I could read up on about this!</p>
  
  <p>Edit:
  Sorry for not adding my attempts, here they are. This is based on some slider I found on the internet. This is the example of the slider with <code>input type="date"</code> that doesn't work. If I change it to <code>input type="range"</code> it starts to work again.</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>var slider = document.getElementById("myRange");
  var output = document.getElementById("demo");
  output.innerHTML = slider.value;
  
  slider.oninput = function() {
    output.innerHTML = this.value;
  }</code></pre>
  <pre class="snippet-code-css lang-css prettyprint-override"><code>.slidecontainer {
    width: 100%;
  }
  
  .slider {
    -webkit-appearance: none;
    width: 100%;
    height: 25px;
    background: #d3d3d3;
    outline: none;
    opacity: 0.7;
    -webkit-transition: .2s;
    transition: opacity .2s;
  }
  
  .slider:hover {
    opacity: 1;
  }
  
  .slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 25px;
    height: 25px;
    background: #4CAF50;
    cursor: pointer;
  }
  
  .slider::-moz-range-thumb {
    width: 25px;
    height: 25px;
    background: #4CAF50;
    cursor: pointer;
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;head&gt;
    &lt;meta name="viewport" content="width=device-width, initial-scale=1"&gt;
  &lt;/head&gt;
  
  &lt;h1&gt;Slider&lt;/h1&gt;
  &lt;p&gt;Slidertext&lt;/p&gt;
  
  &lt;div class="slidecontainer"&gt;
    &lt;input type="date" min="1900-1-1" max="1910-1-1" value="50" class="slider" id="myRange"&gt;
    &lt;p&gt;Value: &lt;span id="demo"&gt;&lt;/span&gt;&lt;/p&gt;
  &lt;/div&gt;</code></pre>
  </div>
  </div>
  </p>