Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
705
UltraMonthViewMulti : day background colour
posted

Hi

I want to use a calendar that allows the user to pick several dates by clicking on them. 

My question is, how can I change the background colour of the days the user clics on, when using an UltraMonthViewMulti ? (Although I've never used an UltraMonthViewMulti control yet).

For instance, if the user clics on the 10th, I want to set the background colour of the 10th to red. If he then clicks on the 22nd, I want to change the 22nd also to red but maintaining the colour red on the 10th. 

Also, once he has "marked" several days in red, how can I iterate through the days to check which ones are red?

Thank you

  • 705
    Verified Answer
    Offline posted

    I have found that the user can naturally select several dates by keeping the Control key pressed.

    And to iterate through the selected dates, this is one way to do it:

    For i = 0 To UltraMonthViewMulti1.CalendarInfo.SelectedDateRanges.Count - 1

         pMin_date = UltraMonthViewMulti1.CalendarInfo.SelectedDateRanges(i).StartDate 
         pMax_date = UltraMonthViewMulti1.CalendarInfo.SelectedDateRanges(i).EndDate 

         pCurrent_date = pMin_date
         Do
               ' whatever

               pCurrent_date = DateAdd(DateInterval.Day, 1, pCurrent_date)

         Loop Until pCurrent_date  > pMax_date
    Next i

  • 6120
    Offline posted

    Hello Mariela,

    You can refer to the below post on how to color selected dates on UltraMonthViewMulti:

    http://es.infragistics.com/community/forums/t/80975.aspx

    Please let me know if I may be of further assistance.

    Sincerely,
    Sahaja Kokkalagadda
    Associate Software Developer