Can I control Year selection from Datetime Picker

From the datetimepicker control I am able to select the date but not the time
Can I select the time also from Datetime picker control

Thanks


Answer this question

Can I control Year selection from Datetime Picker

  • mystiq

    There are two fields that deal with this:
    1) DateTimePicker.Format.  Enum with 4 settings
        a) Long    - A long date form (  5 January, 2004)
        b) Short - A short date form (1/5/2004)
        c) Time - A time format
        d) Custom

    If you choose Custom, then you need to set:
    2) DateTimePicker.CustomFormat

    I recommend reading the documentation on the CustomFormat field as it is very flexible in terms of the ways that date and/or time can show up in the date time picker.

  • Vinay Kant

    Thanks


    From the datetime  picker control-

    Can I restrict the year selection. User can select only 

    previous year of the current year
    current year and
    Next year of the current year

    and time hours from 0 to 24


  • !Leonardo

    Thanks My problem got solved. I had set the mindate and maxdate
  • Can I control Year selection from Datetime Picker