Solved

calendar date picker

Posted on 2007-04-04
3
525 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
  • 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

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
JavaScript can be used in a browser to change parts of a webpage dynamically. It begins with the following pattern: If condition W is true, do thing X to target Y after event Z. Below are some tips and tricks to help you get started with JavaScript …
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)
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…

707 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

11 Experts available now in Live!

Get 1:1 Help Now