0

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.

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

3
Contributors
2
Replies
3
Views
8 Years
Discussion Span
Last Post by ddanbe
0

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

0

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.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.