jQRangeSlider icon indicating copy to clipboard operation
jQRangeSlider copied to clipboard

JQDateSlider: Current Date in bounds

Open Speedx opened this issue 12 years ago • 6 comments

Hi, I'm using the JQDateSlider and now I want that the min variable in bounds always displays the current date.

I now how to get the current Date with jquery but I don't know how to put it in the bounds min variable.

May someone can help me with this issue.

Speedx avatar Aug 27 '13 11:08 Speedx

I think I fixed my problem. So here is my solution:

var d = new Date(); var month = d.getMonth()+1; var day = d.getDate(); var output = d.getFullYear() + ',' + month + ',' + day;

$('#slider-range').dateRangeSlider({ bounds: {min: new Date(output), max: new Date(2014, 3, 30, 12, 59, 59)} });

EDIT: If I do it with the above code, I can not submit my checkboxes. Maybe someone has an other solution???

Speedx avatar Aug 27 '13 11:08 Speedx

What do you mean by submitting your checkboxes? Do you have an examplr , HTML file, jsbin or jsfiddle ?

ghusse avatar Aug 28 '13 11:08 ghusse

I have a form, that looks like this:

http://jsfiddle.net/YKqSe/

And when I have this code in my rangeSlider:

bounds: {min: new Date(output), max: new Date(2014, 3, 30, 12, 59, 59)}

When I submit my form with the values I choose from the date range , all contents with my chosen date range are displayed. But when I want to submit one of the checkboxes, it displays all contents but only the contents with my chosen value should be displayed.

Speedx avatar Aug 29 '13 08:08 Speedx

Hello,

Can you provide me an example where you reproduce the actual issue you're trying to fix?

ghusse avatar Aug 29 '13 08:08 ghusse

This is a link to my test site

http://hasselbach.rpdweb.de/test/

Speedx avatar Aug 29 '13 08:08 Speedx

Sorry for the delay. Is there something I can do for you?

ghusse avatar Nov 01 '13 13:11 ghusse