Solved

how to use jquery datepicker

Posted on 2011-09-12
2
422 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
Comment Utility
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
Comment Utility
$('#datepicker').datepicker({
   onSelect: function(dateText, inst) { $("#datepicker_value").val( dateText ); }
});
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

jQuery is a JavaScript library that greatly simplifies JavaScript programming. AJAX is an acronym formed from "Asynchronous JavaScript and XML."  AJAX refers to any communication between client and server, when the human client does not observe a…
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 …
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

771 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now