DateTimePicker Novigation

Moishe

Member
Joined
May 30, 2003
Messages
24
Hi,
Does anyone know how do I novigate through DateTimePicker in the way that when I press leftbutton it would go to the previous day and the same thing for the next day.
I know how to do it in the monthcalendar but I need to use datetimepicker.

Thanks
 
You can change the Value property to reflect the new date. For example
Code:
DateTimePicker1.Value = DateTimePicker1.Value.AddMonths(1)
go to the next month. You can use AddSeconds, AddDays, etc, and if you give it a negative value, it will subtract them. So AddDays(1) and AddDays(-1) is probably what you need.
 
Back
Top