locked
Using Month Calendar in VB.NET RRS feed

  • Question

  • Hi There,

    I have a date field as user input and would like to use the Month Calendar Control. How do I use it, never used it before. Help appreciated.

    Thanks,


    Farquest

    Thursday, July 11, 2013 6:03 PM

Answers

  • Any sample Code For VB.NET ?

    Farquest

    Well it's easy enough really.

    The documentation is here. The only caveat to using one is this: When it's displayed initially, unless you've set the .Value, the default will be to show "Today" ... BUT ... it's not yet set! Until the user actually clicks on that date (or any other), the .Value hasn't been set.

    Generally when using one, I'd suggest that in the form's .Load event, go ahead and set the .Value to Today() or Now().


    Please call me Frank :)

    • Marked as answer by Farquest Thursday, July 11, 2013 7:33 PM
    Thursday, July 11, 2013 6:17 PM

All replies

  • Why not use a DateTimePicker control? It sounds like that suits your needs better, no?

    Please call me Frank :)

    Thursday, July 11, 2013 6:08 PM
  • Any sample Code For VB.NET ?

    Farquest

    Thursday, July 11, 2013 6:13 PM
  • Any sample Code For VB.NET ?

    Farquest

    Well it's easy enough really.

    The documentation is here. The only caveat to using one is this: When it's displayed initially, unless you've set the .Value, the default will be to show "Today" ... BUT ... it's not yet set! Until the user actually clicks on that date (or any other), the .Value hasn't been set.

    Generally when using one, I'd suggest that in the form's .Load event, go ahead and set the .Value to Today() or Now().


    Please call me Frank :)

    • Marked as answer by Farquest Thursday, July 11, 2013 7:33 PM
    Thursday, July 11, 2013 6:17 PM
  • What do you mean by using it? How do you desire it be used?

    Please BEWARE that I have NO EXPERIENCE and NO EXPERTISE and probably onset of DEMENTIA which may affect my answers! Also, I've been told by an expert, that when you post an image it clutters up the thread and mysteriously, over time, the link to the image will somehow become "unstable" or something to that effect. :) I can only surmise that is due to Global Warming of the threads.

    Thursday, July 11, 2013 6:18 PM
  • The requirement is to use the Month Calendar Control, let me know how best this can be used in the Windows Forms using VB.NET

    Thanks,


    Farquest

    Thursday, July 11, 2013 6:22 PM
  • The requirement is to use the Month Calendar Control, let me know how best this can be used in the Windows Forms using VB.NET

    Thanks,


    Farquest

    This is starting to sound like a list of demands. Is there ransom money involved here?

    ... anyway ...

    With a MonthCalendar control, it's meant to select a range of dates. How are you going to discern what date (as in one) they meant?

    In the link I just showed here, do you see a .Value property or a .Date property?

    To each their own, but I think a DTP makes more sense.


    Please call me Frank :)

    Thursday, July 11, 2013 6:26 PM
  • The requirement is to use the Month Calendar Control, let me know how best this can be used in the Windows Forms using VB.NET

    Thanks,


    Farquest

    I believe that depends on the code you could write to use with the month calendar. Such as the code I and another poster worked on which uses the month calendar. The code highlights stored dates on the month calendar with a red border around the dates. And if a date with a red border is clicked on then the notes the user had added for that date appear.


    Please BEWARE that I have NO EXPERIENCE and NO EXPERTISE and probably onset of DEMENTIA which may affect my answers! Also, I've been told by an expert, that when you post an image it clutters up the thread and mysteriously, over time, the link to the image will somehow become "unstable" or something to that effect. :) I can only surmise that is due to Global Warming of the threads.


    Thursday, July 11, 2013 6:33 PM
  • Sorry, Did not mean that way, was new to this and wondering which would be best and will try out the DateTimePicker control and let you know.

    Thanks,


    Farquest

    Thursday, July 11, 2013 6:39 PM
  • Also the DTP and Month Calendar support the Gregorian calendar and the dates you can use with it, I suppose, are anything between and including the dates in the textbox.


    Please BEWARE that I have NO EXPERIENCE and NO EXPERTISE and probably onset of DEMENTIA which may affect my answers! Also, I've been told by an expert, that when you post an image it clutters up the thread and mysteriously, over time, the link to the image will somehow become "unstable" or something to that effect. :) I can only surmise that is due to Global Warming of the threads.

    Thursday, July 11, 2013 7:07 PM
  • Sorry, Did not mean that way, was new to this and wondering which would be best and will try out the DateTimePicker control and let you know.

    Thanks,


    Farquest

    It will depend on what you want to use it for. That is like asking what is better a car or a truck? Your answer would be "Well it depends on what you want to use it for?" If you could explain what you want to do then i am sure someone could tell a little about doing it or maybe give some examples to help you get started.  :)
    • Proposed as answer by Mr. Monkeyboy Thursday, July 11, 2013 10:16 PM
    Thursday, July 11, 2013 7:47 PM