Solved

how to use jquery datepicker

Posted on 2011-09-12
2
445 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
  • 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

ScreenConnect 6.0 Free Trial

Want empowering updates? You're in the right place! Discover new features in ScreenConnect 6.0, based on partner feedback, to keep you business operating smoothly and optimally (the way it should be). Explore all of the extras and enhancements for yourself!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
asp syntax 3 52
ASP SQL Syntax Duplicate Key 7 105
Connection to multiple databases 13 22
innerHTML 7 23
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…
Have you ever needed to get an ASP script to wait for a while? I have, just to let something else happen. Or in my case, to allow other stuff to happen while I was murdering my MySQL database with an update. The Original Issue This was written…
This Micro Tutorial will give you a basic overview how to record your screen with Microsoft Expression Encoder. This program is still free and open for the public to download. This will be demonstrated using Microsoft Expression Encoder 4.

832 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