RadzenDatePicker the DateRender does not apply the class attribute

If you try to apply a class attribute like this:

   void OnSecondDateRender(DateRenderEventArgs args)
    {
        if (_firstDateValue == null) return;
        IEnumerable<DateTime> dates = [_firstDateValue.Value];

        var hasHighlightedDate = dates.Select(d => d.Date).Contains(args.Date.Date);
        if (hasHighlightedDate)
        {
            args.Attributes.Add("style", "background-color: var(--colors-primary-primary);border-radius: 4px;");
            args.Attributes.Add("class","ggg");
          
        }
    }

Only the style attribute works. The class property is not added.

Will be fixed in our next update early next week.

1 Like