Solved

how to use jquery datepicker

Posted on 2011-09-12
2
458 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: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

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

Suggested Solutions

Title # Comments Views Activity
How can i  prevent default  Submision? 6 37
Ahax pagination 9 48
How to post data to an API using ASP Classic 3 31
Want an individual results display div 8 46
Introduction Got endorsements from your clients?  Great!  There is almost nothing better than word-of-mouth advertising.  But how can you do that on the internet?  Sure you can make a page for endorsement quotations and list them all, but who is …
Nothing in an HTTP request can be trusted, including HTTP headers and form data.  A form token is a tool that can be used to guard against request forgeries (CSRF).  This article shows an improved approach to form tokens, making it more difficult to…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial

726 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