i am trying to use month calender control.
when ever the cursor came to a textbox the calender has to display and
if i select a date in calender the date should be placed in a textbox.
can any one please help me?
Thanks
Srikanth
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
PJ MartinsPosted May 29, 2010, 7:56 PM
private void textBox1_Click(object sender, EventArgs e)
{
monthCalendar1.Visible = true;
}
private void textBox1_Leave(object sender, EventArgs e)
{
monthCalendar1.Visible = false;
}
private void monthCalendar1_DateChanged(object sender, DateRangeEventArgs e)
{
textBox1.Text = monthCalendar1.SelectionStart.ToString("MM/dd/yyyy");
monthCalendar1.Visible = false;
}