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.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
PJ MartinsRank #2,548 · 548 reputationPosted May 29, 2010, 3:56 PM EDT
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;
}