Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

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

  • *Experts*
Posted
You can change the Value property to reflect the new date. For example
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.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...