boruch
boruch

Reputation: 463

Searching for JavaScript datepicker slider

I am searching for a datepicker that will give the user a date selecting slider (Something like Moving Boxes )

Where I (the preload programmer) select a date, and the user can slide either way to change it by one day at a time.

I'm using jquery, but any other framework would work fine as well.

Upvotes: 2

Views: 526

Answers (2)

Lakshmana Kumar D
Lakshmana Kumar D

Reputation: 2283

$(function() {
  var baseDate = new Date(2011, 1-1, 1);
  $('#datepicker').datepicker(); // Initialise datepicker
  $('#slider').slider({ // Initialise slider
        slide: function(event, ui) { // As it slides
              var date = new Date(baseDate.getTime()); // Calculate the new date
              date.setDate(date.getDate() + ui.value);
              $('#datepicker').datepicker('setDate', date); // And set into the datepicker
        }
  });

});

Upvotes: 0

Aelios
Aelios

Reputation: 12137

Maybe you will find what you are looking for with FullCalendar

Upvotes: 3

Related Questions