VS 2013, VB.NET Windows Form.
I need an input from the user, which is a Date. I don't want anybody to type the date, so I tried MonthCalendar as a way for a user to enter a date. I put a Label on a Form. Initially the label is empty and MonthCalendar is not Visible, so when user clicks on a label, today's date will be (pre) selected in a MonthCalendar and the 'calendar' is shown to the user. That seams to be the default setting for MonthCalendar anyway (am I right?). Once the data is selected from MonthCalendar, I want the date from MonthCalendar to be in a Label and the calendar to be gone (Visible to False). That seams to work, but...
The next step is - I already have a Date in a Label (ket's say 5/5/2005), so when user clicks on a Label, I want the MonthCalendar to show this date / have this date to be 'pre-selected' in MonthCalendar. How do I do that?
There are some other problems with MonthCalendar: it seams to be designed to work with Start and End dates, with the default 'span' of 7 days. I just want 1 date, and that could be in 1995 or 2044.
I did try DateTimePicker. I could make it show up when I needed it, but I could not make it gone (Visible = False) when I am done. Actually it was 'gone' before I was done selecting the Date: I did Visible = False when the Date was selected, but that also fired when you selected different Month or Year. So the DTP was gone before I had a chance to select a Date from other months / years.
Any suggestions as what/how to use to accomplish what I want?
Have fun.
---- Andy
There is a great need for a sarcasm font.
I need an input from the user, which is a Date. I don't want anybody to type the date, so I tried MonthCalendar as a way for a user to enter a date. I put a Label on a Form. Initially the label is empty and MonthCalendar is not Visible, so when user clicks on a label, today's date will be (pre) selected in a MonthCalendar and the 'calendar' is shown to the user. That seams to be the default setting for MonthCalendar anyway (am I right?). Once the data is selected from MonthCalendar, I want the date from MonthCalendar to be in a Label and the calendar to be gone (Visible to False). That seams to work, but...
The next step is - I already have a Date in a Label (ket's say 5/5/2005), so when user clicks on a Label, I want the MonthCalendar to show this date / have this date to be 'pre-selected' in MonthCalendar. How do I do that?
There are some other problems with MonthCalendar: it seams to be designed to work with Start and End dates, with the default 'span' of 7 days. I just want 1 date, and that could be in 1995 or 2044.
I did try DateTimePicker. I could make it show up when I needed it, but I could not make it gone (Visible = False) when I am done. Actually it was 'gone' before I was done selecting the Date: I did Visible = False when the Date was selected, but that also fired when you selected different Month or Year. So the DTP was gone before I had a chance to select a Date from other months / years.
Any suggestions as what/how to use to accomplish what I want?
Have fun.
---- Andy
There is a great need for a sarcasm font.