| | |
Date Picking from windows form Calender
Please support our C# advertiser: Intel Parallel Studio Home
![]() |
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 alignment app array barchart bitmap box broadcast c# c#gridviewcolumn cast check checkbox client combobox communication control conversion csharp custom database datagrid datagridview dataset datatable datetime degrees development draganddrop drawing elevated encryption enum event excel file focus form format forms function gdi+ hospitalmanagementsystem httpwebrequest image index input install java label list listbox login mandelbrot math messagebox mouseclick mysql operator path photoshop picturebox pixelinversion plotting pointer post programming radians read regex remote remoting richtextbox server sleep socket sql statistics stream string stringformatting sun table text textbox thread time timer update usercontrol validation visualstudio webbrowser whileloop windows winforms wpf xml






