Arun Thankur
Arun Thankur

Reputation: 129

How to mark dates in datetime Pick Control

I want to mark my days in dateTimePicker on the behalf of bit field from my database in asp.net window forms.Anybody please let me know how to proceed.

thank's In Advance.

Upvotes: 1

Views: 1534

Answers (2)

Gorgsenegger
Gorgsenegger

Reputation: 7856

You could use the MonthCalendarcontrol which allows the selection of multiple dates via the BoldedDates array:

monthCalendar1.BoldedDates = 
    new DateTime[] { DateTime.Now, DateTime.Now.AddDays(3) };

This way you can at least mark your dates differently, although not in different colours but only in normal and bold.

Upvotes: 1

danish
danish

Reputation: 5600

Since you have mentioned ASP.Net, I assume you are using default Calendar control. If you see the properties for this control, you will find SelectedDates and SelectedDayStyle. You can make use of these two to achieve what you are trying.

Upvotes: 0

Related Questions