| | |
Date Picking from windows form Calender
Please support our C# advertiser: $4.95 a Month - ASP.NET Web Hosting – Click Here!
![]() |
Hi, I am trying to pick the particular chosen date from the windows calender displayed.
I am struck here and confused how to proceed.
Any hints or shedding little light on the progress is appreciated.
Thank you
I am struck here and confused how to proceed.
Any hints or shedding little light on the progress is appreciated.
C# Syntax (Toggle Plain Text)
using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; namespace wintest1 { public partial class Form1 : Form { public Form1() { SelectionRange picked = new SelectionRange(); InitializeComponent(); textBox1.Text = "Choose date from below"; if (picked != null) { textBox1.Text = picked.ToString(); } } private void calender_DateChanged(object sender, DateRangeEventArgs e) { } private void textBox1_TextChanged(object sender, EventArgs e) { } } }
Thank you
Last edited by csharplearner; Dec 19th, 2008 at 4:10 pm.
•
•
Join Date: Aug 2008
Posts: 1,735
Reputation:
Solved Threads: 186
OK so you found the event to say the selections changed, what exact issue are you having? other than you have put what looks like your date picked code into the form loading event
Did I just hear "You gotta help us, Doc. We've tried nothin' and we're all out of ideas" ? Is this you? Dont let this be you! I will put in as much effort as you seem to.
DateRangeEventArgs e has a Start and End method, which both return a DateTime object. Do processing in your eventhandlers initialising is done in the constructor.
I would use a DateSelected event if I wanted to know the date selected.
I would use a DateSelected event if I wanted to know the date selected.
Today is a gift, that's why it is called "The Present".
Make love, no war. Cave ab homine unius libri.
Danny
Make love, no war. Cave ab homine unius libri.
Danny
![]() |
Other Threads in the C# Forum
- Previous Thread: error when trying to update dataset with oledb
- Next Thread: How to create an installer for a VSTO add in to MS Outlook
| Thread Tools | Search this Thread |
.net access algorithm app application array bitmap box c# check checkbox client color combo combobox concurrency control conversion csharp custom cyclethruopenforms data database datagrid datagridview dataset datatable date/time datetime degrees dll draganddrop drawing enabled encryption enum excel file filename finalyearproject form format forms function gdi+ getoutlookcontactusinfcsvfile gis globalization gtk image input install installer java label list localization mandelbrot math microsoftc#visualexpress mono mouseclick mysql operator panel path photoshop picturebox pixelinversion post programming radians regex remoting richtextbox save server sleep socket sql sql-server statistics string table text textbox thread time timer timespan update usercontrol users validate validation visualstudio webbrowser winforms wpf xml






