Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

Hi,

 

I am trying to use MonthCalender to fill the dates in the text boxes in the same form. I don't have any inkling of how to do it. Can anyone please help.

 

Regards

 

Varrey

Posted

I'm not entirely sure what you are trying todo. So I'll give you some examples of working with a MonthCalander.

// this gets the selected date and outputs it to a ShortDate string, 
you can select many differnt formats also, such as ToLongDateString 
monthCalendar1.SelectionStart.ToShortDateString();

If you wished to add this date to a textbox you would do something along the lines of

textBox1.Text = monthCalendar1.SelectionStart.ToShortDateString();

By adding this code to the DateChanged method of the MonthCalander you could then have the textbox updated whenever the MonthCalander is changed.

 

If I didn't provide you with the answer you required, please let me know what it was you needed to know.

Anybody looking for a graduate programmer (Midlands, England)?

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...