How do I set "SpecialDays" and "RecurringEvents" to today's date in a GridDateTimeColumn in Edit mode?

2 posts, 0 answers
  1. Shawn
    Shawn avatar
    66 posts
    Member since:
    Jun 2014

    Posted 05 Nov 2018 Link to this post


    I'm trying to figure out how to set the "SpecialDays", "RecurringEvents", and "ItemStyle-BackColor" of the rendered RadDatePicker for the RadDateTimeColumn in my RadGrid during edit mode.  I want the user to see today's date highlighted when they click on the DatePicker.  It's easy to do this in a regular RadDatePicker control, but I don't know how to do this in a RadGrid.  Any help is appreciated.


    Shawn A.

  2. Eyup
    Eyup avatar
    4046 posts

    Posted 08 Nov 2018 Link to this post

    Hi Shawn,

    Generally, probably as you are already aware, you can achieve this requirement by adding a SpecialDay to the Calendar of the picker control:

    When the picker is placed within a grid template, you can use the same approach.

    When the picker is generated automatically by the grid, you add the SpecialDay to its SharedCalendar instance.

    First, you can access it during ItemDataBound:

    Then, create a new special day and add it to the SharedCalendar of the picker, not its Calendar instance.

    If ItemDataBound is too late, you can do this logic in the ItemCreated event handler:

    I hope this will prove helpful. Give it a try and let me know if it works for you.

    Progress Telerik
    Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Back to Top