I just made a simple Jquery Date Picker . What i Just want is after i select a specific date ( Let's say 2014 / 05 / 03 ) then it should automatically redirect to new page . I was searching for this , But I couldn't find any Luck . How can i do this ?
Asked
Active
Viewed 238 times
2 Answers
0
You could just simply trigger that event (e.g. by jQuery .change()
method) and then call a redirect method:
window.location.replace("http://stackoverflow.com");
(like in How to redirect to another webpage in JavaScript/jQuery?).
Greetings
0
This should work
$('#dateInput').change(function(){
if(conditionMatches)
window.location = "http://google.com";
});
You could even use datepicker's onSelect event
$('.selector').datepicker({
onSelect: function() { ... }
});

Yasser Shaikh
- 46,934
- 46
- 204
- 281