Search code examples
vb6datepickermonthcalendar

How to prevent user from changing date control which is linked to a textbox in VB6


txtmonth = '01/2011' (This is a textbox control)

I have a Date Control which should automatically display January 2011. The end user should not able to select month & year from the date control, only the day.

User should select only the date from that month. How to do this?


Solution

  • You can limit the data range they can select by setting the MinDate and MaxDate properties.

    This applies to both the DTPicker and the MonthCal controls.