7 Years
Discussion Span
Last Post by Unhnd_Exception

month calendar function in vb.net which view the date and month selection....

I want to add a listbox in that monthcalendar function... Is it possible to do it or Impossible...

Just want to know the answer....



month calendar function in vb.net

i believe you are talking about month calender control.

If you want to select both data and time then DateTimePicker is what you are looking for.


ya true.. I already done for my DateTimePicker which able to select date and time.

Your conclusion is impossible to have datetimepicker selection in monthcalendar?

Monthcalendar function is limited? We can't add any function like combobox, text box in monthcalendar itself?


In that you need to create your own customized control.

As the name of the controls suggests DateTimePicker and MonthCalendar control are designed to cater into different requirements.


Your said "We can't add any function like combobox, text box in monthcalendar itself? "

What about to make a Dialog, and put the Controls in the one Dialog. Why have to be added to the Calendar control?


Okay.... What I need now is I want to select a time as well in monthcalendar... I don't want to use datetimepicker, is it possible..

I was required to do so where there is a time selection in monthcalendar.

Posibble to do so?

Kindly advice?


I'm pretty sure debasisdas answered this with you need to create your own control.

Add a new usercontrol to the project. Drag a MonthCalendar control on it. Drag a DateTimePicker on it. Set the DateTimePicker's format to time and showupdown arrows to true. Add two properties in the usercontrols code so you can access the two controls.

Public Class UserControl1

    ReadOnly Property MonthCalendar() As MonthCalendar
            Return MonthCalendar1
        End Get
    End Property

    ReadOnly Property TimePicker() As DateTimePicker
            Return DateTimePicker1
        End Get
    End Property

End Class

Build the project and the usercontrol will be in the toolbox. Drag it to the form. You'll have what the image shows.

And you can always just drag the month calender and datetimepicker to the form and do the same thing.

Edited by Unhnd_Exception: n/a

Attachments Untitled.png 10.76 KB
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.