i want to use jquery UI's datepicker to trigger a POST that would then load information from the date picked on the datepicker from my database.
so i guess this is a two-part question
is there a way i can make it so the datepicker date, when selected, just gets passed into a POST, so someone would click on jan 1 2010 and it would automatically go to mysite.com?date=01012010 or something like that the way it is now the datepicker just updates a text box with the date, so upon clicking on jan 1 2010, the text box is populated with 01-01-2010
which brings me to part 2 if there is no way to do what i asked in part 1, is there a method that triggers an event on the text box being updated, that way i could just do
onTextUpdate{
redirect to - mysite.com?date=$whateverIsInTextBox
}
or something like that
please let me know if you have any solutions or ideas to do this, thanks a lot
There are a number of events attached to the jQuery datepicker widget; onSelect should cover point #1 above:
In your case, you can use the $.GET or $.POST functions to pass the data to the server.
use the OnSelect event of the date picker
you can try other events of the datepicker control based on your requirement
You could do something like this if you don't want to use ajax:
And if you do: