Click here to Skip to main content
15,894,630 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Im having issues with this because I'm currently working on a
reservation system and I want to block out dates that the user
already taken in the datetimpicker.

What I have tried:

Im having issues with this because I'm currently working on a
reservation system and I want to block out dates that the user
already taken in the datetimpicker.
Posted
Updated 14-Dec-17 1:54am

1 solution

So you should catch the ValueChanged-Event from your DateTimePicker and check it's Value against the List which contains the Dates which are currently selected.
If Value is equal to one Entry of this List you should not accept the Selection - perhaps you show a MessageBox.

The original DateTimePicker-Control has no ability to disable Dates which are given by an external List (or Array).
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900