Solved

calendar date picker

Posted on 2007-04-04
3
547 Views
Last Modified: 2013-11-27
Hi all,

I am using c# code behind/ASP.NET.

I need some code that will generate a "calendar date picker" ...eg i need a form with two text boxes with two calendar images next to them and when the calendar images are clicked a need a calendar to pop up and the user select a date and the date selected populates the text boxes.

If i could get this in  c# it would be great.  
If its javascript i will need details instructions on how and were to place the code because i am NOT a javascript user and dont know much about it.

so if someone could please help me it would be appreciated.

Thanks,
J
0
Comment
Question by:joan2006
[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
3 Comments
 
LVL 35

Accepted Solution

by:
mrichmon earned 500 total points
ID: 18851394
It will HAVE to be javascript as you want things to open/close on teh client end (i.e. calendar open, populate textbox, etc)

There are many out there.

If you want one wrapped in an asp.net control you could look at:
http://www.basicdatepicker.com/

Otherwise there are free ones not in an asp.net wrapper like this:
http://www.javascriptkit.com/script/script2/tengcalendar.shtml

Instructions to use are on the page, but here is how you would use with asp:textbox

In head of page put:
<script language="javascript" type="text/javascript" src="datetimepicker.js">

//Date Time Picker script- by TengYong Ng of http://www.rainforestnet.com
//Script featured on JavaScript Kit (http://www.javascriptkit.com)
//For this script, visit http://www.javascriptkit.com

</script>

In the body of the page put:

<asp:textbox id="calendar1" runat="Server" /><a href="javascript:NewCal('calendar1','MMddyyyy')"><img src="http://www.javascriptkit.com/script/script2/cal.gif" width="16" height="16" border="0" alt="Pick a date"></a>


Then on the backend you just access calendar1.Text - just like any other textbox
0
 
LVL 35

Expert Comment

by:mrichmon
ID: 18851420
Oh you will also need to download the javascript file and place in your website.

The javascript file : datetimepicker.js
can be downloaded from the link in a zipfile, which also contains the images (so you can link to the image on your site instead of thiers, and demo pages.
0
 

Author Comment

by:joan2006
ID: 18853860
Thanks a million!!
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Whether you've completed a degree in computer sciences or you're a self-taught programmer, writing your first lines of code in the real world is always a challenge. Here are some of the most common pitfalls for new programmers.
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…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

630 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