Gradient colour for event

4 posts, 0 answers
  1. Kevork
    Kevork avatar
    39 posts
    Member since:
    May 2015

    Posted 13 Jan Link to this post

    Hi,

     

    I have applied different colours for different events but I need to show different gradient colours or 2 colours for each event. Is there any way to do this?

     

    Thanks in advance.

  2. Iliana Nikolova
    Admin
    Iliana Nikolova avatar
    2592 posts

    Posted 15 Jan Link to this post

    Hi Kevork,

    You could apply gradient to the scheduler events by using linear gradient in the CSS background property. As an example: 
    .k-scheduler .k-event {
      background: -o-linear-gradient(bottom, #B55FEB 0%, #472B52 55%);
      background: -moz-linear-gradient(bottom, #B55FEB 0%, #472B52 55%);
      background: -webkit-linear-gradient(bottom, #B55FEB 0%, #472B52 55%);
      background: -ms-linear-gradient(bottom, #B55FEB 0%, #472B52 55%);
      background: linear-gradient(to bottom, #B55FEB 0%, #472B52 55%);
    }


    Regards,
    Iliana Nikolova
    Telerik
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
  3. UI for ASP.NET MVC is VS 2017 Ready
  4. Kevork
    Kevork avatar
    39 posts
    Member since:
    May 2015

    Posted 18 Jan in reply to Iliana Nikolova Link to this post

    Thanks for the answer. This solution will apply the same gradient colour for all events but I need different gradient colours for different events based on event's status. How can I achieve that?

     

    Thanks in advance.

  5. Iliana Nikolova
    Admin
    Iliana Nikolova avatar
    2592 posts

    Posted 20 Jan Link to this post

    Hi Kevork,

    You could set different gradients in the same way as colors (for example by using eventTemplate). Take a look at this dojo which should give a basic idea.

    Regards,
    Iliana Nikolova
    Telerik
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Back to Top
UI for ASP.NET MVC is VS 2017 Ready