C# DateTimePicker Help Needed

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • CsharpStudent
    New Member
    • Nov 2007
    • 1

    #1

    C# DateTimePicker Help Needed

    I am using the DateTimePicker control to select a time (time format). I want the user to be only able to select times greater than the current time.

    I would rather not have any validation involved instead I would like the option to select earlier times to be disabled.

    I can't seem to find a way to do so. Any ideas?
  • Frinavale
    Recognized Expert Expert
    • Oct 2006
    • 9749

    #2
    Originally posted by CsharpStudent
    I am using the DateTimePicker control to select a time (time format). I want the user to be only able to select times greater than the current time.

    I would rather not have any validation involved instead I would like the option to select earlier times to be disabled.

    I can't seem to find a way to do so. Any ideas?

    Sorry but you're going to have to do validation to prevent this.
    All you have to do is check the selected date and compare it to the current one...it's not that bad of a validation check!

    -Frinny

    Comment

    Working...