We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
i used this script : `var min2 = new Date("2014-01-01 00:00:00"), max2 = new Date("2014-01-02 00:00:00");
function addZero(val) { if (val < 10) { return "0" + val; } return val; } $("#slider2").dateRangeSlider({ bounds: { "min": min2, "max": max2 }, range: { min: { minutes: 1 } }, scales: [ //primary { first: function(val) { return val; }, next: function(val) { var next = new Date(val); return new Date(next.setMinutes(val.getMinutes() + 30)); }, stop: function(val) { return false; }, label: function(val) { return addZero(val.getHours()) + ':' + addZero(val.getMinutes()); }, format: function(tickContainer, tickStart, tickEnd) { tickContainer.addClass("myCustomClass"); } }, //secondary { first: function(val) { return val; }, next: function(val) { var next = new Date(val); return new Date(next.setMinutes(val.getMinutes() + 1)); }, stop: function(val) { return false; }, label: function(val) { return ""; }, format: function(tickContainer, tickStart, tickEnd) { } } ], formatter: function(val) { var h = val.getHours(), m = val.getMinutes(); return addZero(h) + ':' + addZero(m); }, defaultValues: { min: new Date("2014-01-01 00:00:00"), max: new Date("2014-01-01 00:00:50") } });`
but how if i want to add seconds label ? thx
The text was updated successfully, but these errors were encountered:
Hello,
Just change the formatter function to display seconds. You get a Date object, on which you can call getSeconds() to get the number of seconds
getSeconds()
Sorry, something went wrong.
No branches or pull requests
i used this script :
`var min2 = new Date("2014-01-01 00:00:00"),
max2 = new Date("2014-01-02 00:00:00");
but how if i want to add seconds label ?
thx
The text was updated successfully, but these errors were encountered: