Communities for your favorite technologies. Explore all Collectives
Stack Overflow for Teams is now called Stack Internal. Bring the best of human thought and AI automation together at your work.
Bring the best of human thought and AI automation together at your work. Learn more
Find centralized, trusted content and collaborate around the technologies you use most.
Stack Internal
Knowledge at work
Bring the best of human thought and AI automation together at your work.
I need to setup an ASP.Net MVC view with a Date Picker that will send a postback to the controller when it is changed with its new date. I know there is a Date Picker in JQuery, but how would i get it to send the data to the controller?
You could just attach something to the onchange on that element.
... $("#datapicker").change(function(){ $.post('someurl', data); } ...
Add a comment
The jQuery Datepicker has an option named onSelect. You can pass a function to that option to post the data to server-side.
onSelect
$("#datepicker").datepicker({ onSelect: function(dateText, instance) { //post the data here } });
Required, but never shown
By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.
Start asking to get answers
Find the answer to your question by asking.
Explore related questions
See similar questions with these tags.