Chong Posted July 30, 2003 Posted July 30, 2003 Will anyone show me how to insert the selected date from a MonthCalendar control? When I user click on a certain date on the MonthCalendar control, I want to insert this date into a textbox. How do I do that? Many thanks in advance! ljCharlie Quote
*Experts* Nerseus Posted July 31, 2003 *Experts* Posted July 31, 2003 In the DateChanged event you can use the argument e to get the start and end date range (both as DateTime variables): textBox1.Text = e.Start.ToString("MM/dd/yyyy"); textBox2.Text = e.End.ToString("MM/dd/yyyy"); Otherwise, you can use the SelectionStart and SelectionEnd properties of the control to get the same DateTime values. If only one date is selected, both values will be the same. -Nerseus Quote "I want to stand as close to the edge as I can without going over. Out on the edge you see all the kinds of things you can't see from the center." - Kurt Vonnegut
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.