user3897585
user3897585

Reputation: 1477

Using dates from database column with calendar control

task table

I'm trying to work with the ASP calendar control and (for starters) highlight the specific days on the calendar that matches DueDate in the 'task' table. I know how to highlight a cell using the DayRender event, but how do I do this in accordance to the database table?

Would then also like to be able to click on the highlighted cell and see details of the task associated to that date in some sort of box next to the calendar.

Any pointers on how I can solve this?

Upvotes: 0

Views: 573

Answers (1)

user145400
user145400

Reputation: 1084

Pseudo-code:

  • Determine your desired date range (probably a certain month)
  • Read all the tasks that have due dates within that date range (probably need Name and DueDate at least)
  • In your DayRender handler you check if current day's date exists in the loaded tasks's due dates, if it does, highlight it with the color of your choice
  • In you SelectionChanged handler you obtain the selected day's date, and look through the loaded list of tasks for any tasks that have that date as their due date, and populate whatever box with those tasks.

Upvotes: 1

Related Questions