"format" option breaks the slider completely
See original GitHub issueHere’s the reduced case. If you remove the format : { … } section, everything works (well, except the custom formatting). It looks like your code sends NaN as parameters to the from() and to() methods.
<link href="https://cdnjs.cloudflare.com/ajax/libs/noUiSlider/9.0.0/nouislider.min.css" rel="stylesheet" type="text/css">
<div id="range"></div>
<script src="https://cdnjs.cloudflare.com/ajax/libs/noUiSlider/9.0.0/nouislider.min.js" type="text/javascript"></script>
<script>
var months = ['Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec'];
slider = document.getElementById('range');
slider.style.width = "50%";
slider.style.margin = "50px";
var date_range = {min: 1468951379, max: 1477116021};
var options = {
start: [date_range.min, date_range.max],
connect: true,
range: date_range,
format: {
to: function(v){
var a = new Date(v * 1000);
return months[a.getMonth()] + " " + a.getDate();
},
from: function(v) {
var a = new Date(v * 1000);
return months[a.getMonth()] + " " + a.getDate();
}
},
tooltips: true
};
noUiSlider.create(slider, options);
</script>
`
Issue Analytics
- State:
- Created 7 years ago
- Reactions:1
- Comments:11 (5 by maintainers)
Top Results From Across the Web
Keep the Formatting of an Inserted Slide in PowerPoint
After pasting a new slide into the slide thumbnails on the left, look for the "Paste Options" icon at the bottom-right of the...
Read more >Slider Question - Qualtrics
The slider question will reformat on mobile screens so that all the necessary information fits if you go to Format and select Mobile...
Read more >Working with Slides - ProPresenter User Guide
First, put the cursor where you would like the text to break between slides, then either click the Insert Slide Break button on...
Read more >7.3 Slide formatting | R Markdown: The Definitive Guide
Every new slide is created under three dashes ( --- ). The dashes must be directly followed by a line break, and there...
Read more >Guides for arranging things on a slide in PowerPoint
Press Shift to select multiple objects. Select Picture Format > Align and select type of alignment: Align Left, Align Center, or Align Right....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
leongersen, your comment made me test a few things. Turns out from() method actually gets a number, not a string - you can console.log it, if you don’t believe me.
So this change made everything work:
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.