Solved

calendar date picker

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

PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

Question has a verified solution.

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

Suggested Solutions

Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
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…

752 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