Solved

how to use jquery datepicker

Posted on 2011-09-12
2
465 Views
Last Modified: 2012-05-12
Hello experts,

I am using this jquery datepicker.

http://docs.jquery.com/UI/Datepicker

and I need to grab the a single selected date in my ASP code. How do I do this? It's probably something simple that I just can't find.

<%response.Write "DatePicker: "&request.Form("#datepicker")&"<br>" %>

Open in new window

Thanks
0
Comment
Question by:dpicco
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
2 Comments
 
LVL 82

Accepted Solution

by:
leakim971 earned 500 total points
ID: 36524472
use an hidden field to store the value for you :

<div id="datepicker"></div>
<input type="hidden" id="datepicker_value" name="datepicker" />


$('.selector').datepicker({
   onSelect: function(dateText, inst) { $("#datepicker_value").val( dateText ); }
});

check the onSelect event definition on this page : http://docs.jquery.com/UI/Datepicker#events

Test page (the hidden field is replace by a textbox to let you see the value) : http://jsfiddle.net/qJ3yg/1/
0
 
LVL 82

Expert Comment

by:leakim971
ID: 36524491
$('#datepicker').datepicker({
   onSelect: function(dateText, inst) { $("#datepicker_value").val( dateText ); }
});
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I recently decide that I needed a way to make my pages scream on the net.   While searching around how I can accomplish this I stumbled across a great article that stated "minimize the server requests." I got to thinking, hey, I use more than one…
ASP.NET AJAX callbacks to web service are becoming very popular and unavoidable these days. The feel that the user gets when only a part of the page is updated without even hindering the UI is the advantage that the callbacks offer. The wait for the…
In this video we outline the Physical Segments view of NetCrunch network monitor. By following this brief how-to video, you will be able to learn how NetCrunch visualizes your network, how granular is the information collected, as well as where to f…
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…

696 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question