Tuesday, May 21, 2024
 Popular · Latest · Hot · Upcoming
112
rated 0 times [  116] [ 4]  / answers: 1 / hits: 28096  / 13 Years ago, tue, may 31, 2011, 12:00:00

Currently I'm using JQuery UI's datepicker range, and I've added some more javascript that should submit the form on the page when different form elements change.



This works on the drop down I've added, as well as the date picker input boxes if I enter dates manually and then click away.



However, if I click an input field for the datepicker, and the date chooser pops up, the form will not submit after choosing a date..



Its as if the input field didn't know a change occured..?



http://api.jquery.com/change/



here is the code I'm using:



$(document).ready(function() {

$('#from').change(function() {
document.myform.submit();
});

});
$(document).ready(function() {

$('#to').change(function() {
document.myform.submit();
});

});


Using the datepicker UI events, I've added the following code for testing but it isn't working.. any ideas?



$(document).ready(function() {

$('#from').datepicker({
onClose: function() { alert('Yo yo!') }
});

});

More From » jquery

 Answers
8

The correct answer is here: jQuery datepicker, onSelect won't work


[#91946] Monday, May 30, 2011, 13 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
margaritakristinak

Total Points: 502
Total Questions: 127
Total Answers: 98

Location: England
Member since Mon, May 17, 2021
3 Years ago
;